Hi guys, im coding my script so it can work on many setups so i need to keep alot of things variable
anyways I have a function to do a header which is an image across the top of the screen
it works fine until i try to load it from the admin directory
(/phpscripts/admin/)
when i try to load it from the admin directory it thinks the image is at localhost/phpscripts/admin/images/banneredit.jpg when it should be localhost/phpscripts/images/banneredit.jpg
i tried to set a path in the config.php file but it does not work...
config.php
// location of images *Do not edit unless you cannot see images*
$path = '../phpscripts/images';
part of do_header(); function
<?php
include ('config.php');
<img src="<?php echo $path;?>images/banneredit.jpg" alt="banner" width="100%"/></td>
I know i can just install the script in root directory and just set the path to
../images/
but im aiming to get my script to work on different setups
eg if a user wants to install my script outside of root directory.
Thanks 🙂