?
Solved

image

Posted on 2005-04-24
3
Medium Priority
?
150 Views
Last Modified: 2010-04-09
i have a directory structure:

/v/blah.com/ast/

ls -l gives 3 directory
images
data
www

if we go to www and ls -l  i have

/www/oos/oos.cgi

in my cgi script
use CONFIG;

print"                <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#3399CC\" width=\"100%\" height=\"60\">
<tr>
<td colspan=\"2\"    BACKGROUND = $CONFIG::IMAGE/1pixelwidth.gif id=\"fillbgtop\"><IMG height=25 src=http://www.xyz.com/images/clear.gif border=0></td>
</tr>
                </table>
";

it is not abe to read imgae $CONFIG::IMAGE/1pixelwidth.gif

CONFIG.pm contains
our $IMAGE = "/v/blah.com/ast/images

why??

0
Comment
Question by:shahrahulb
3 Comments
 
LVL 1

Author Comment

by:shahrahulb
ID: 13854466
if the image is present in  /v/blah.com/ast/www/oos

and if i use  BACKGROUND = $CONFIG::IMAGE/1pixelwidth.gif

then it works fine

but i wantto store all my images in sepertae directory
0
 
LVL 6

Assisted Solution

by:infex
infex earned 600 total points
ID: 13857459
You should define this directory as a virtual internet directory (allow web sharing) and give read access.

In the http:// you should refer to that virtual path.

virtual directory :

right click on the directory, choose properties, web sharing, share this folder.

Hope this helps
0
 
LVL 4

Accepted Solution

by:
divt earned 900 total points
ID: 13857596

shahrahulb,

I suspect that this issue was caused by variable scope.  You can try one of these 2 methods to fix it:

METHOD 1 - expressly define the variable scope

use CONFIG;
our $IMAGE;

print"                <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#3399CC\" width=\"100%\" height=\"60\">
<tr>
<td colspan=\"2\"    BACKGROUND = $CONFIG::IMAGE/1pixelwidth.gif id=\"fillbgtop\"><IMG height=25 src=http://www.xyz.com/images/clear.gif border=0></td>
</tr>
                </table>
";



or METHOD 2 - do not declare $IMAGE in CONFIG.pm and make the variable local


$IMAGE = "/v/blah.com/ast/images";
print"                <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#3399CC\" width=\"100%\" height=\"60\">
<tr>
<td colspan=\"2\"    BACKGROUND = $CONFIG::IMAGE/1pixelwidth.gif id=\"fillbgtop\"><IMG height=25 src=http://www.xyz.com/images/clear.gif border=0></td>
</tr>
                </table>
";



Good luck!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question