Jump to content

Archived

This topic is now archived and is closed to further replies.

hadoob024

Problem with PHP execution or maybe relative path

Recommended Posts

Recently to help with security, I had my web hosting company create a directory for me that's outside of the web document tree. There's a directory called 'Includes' that's located on the same level as the directory 'html'.

Anyway, in the 'Includes' directory, there is a sub-directory called 'Ads'. In this directory, there is a PHP file called 'banner_ads.php' and a bunch of JPG image files. In this php file, I run a simple command:
[code]
echo '<img src="/home/virtual/ofre.com/var/www/includes/Ads/ad1.jpg" border=0 />';
[/code]

Anyways, when I call this file 'banner_ads.php' from a script that's in the web document tree like so:
[code]
include_once ('/home/virtual/ofre.com/var/www/includes/Ads/banner_ads.php');
[/code]


This image does not get displayed. Is there an issue with the way PHP files are run when outside the web document tree? Am I having the command point to the wrong location/path? Thanks!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.