Jump to content

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!
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.