Absolute path question
Posted: Fri Feb 26, 2010 6:17 pm
On a linux system, I have a root directory with the following:
images (directory)
coolstf (directory)
standard.php
standard.php has the standard info for all pages, include image references for the header, sidebar, menu buttons, etc. Image references are simple, ie, 'images/myimage.jpg. Everything works fine for pages in the root directory.
In the directory coolstf, I have the file word.php in which requires standard.php. If, in word.php, I use, standard.php cannot be found. If I change the reference to , standard.php is found, but none of the image references are valid.
If I change an image reference in standard.php to be /image/myimage.jpg, it does not help. What am I doing wrong? How do I need to reference standard.php and the images within it?
Thanks
images (directory)
coolstf (directory)
standard.php
standard.php has the standard info for all pages, include image references for the header, sidebar, menu buttons, etc. Image references are simple, ie, 'images/myimage.jpg. Everything works fine for pages in the root directory.
In the directory coolstf, I have the file word.php in which requires standard.php. If, in word.php, I use
Code: Select all
<?php require('/standard.php'); ?>Code: Select all
<?php require('./standard.php'); ?>If I change an image reference in standard.php to be /image/myimage.jpg, it does not help. What am I doing wrong? How do I need to reference standard.php and the images within it?
Thanks