2013-07-19

So I created an image.php file with this code and put it in my public_html folder:

and then I put this code in an html page in my public_html folder:

which perfectly displayed the "my image.jpg" file in my browser when I loaded the page. So this tells me that I do have access to the folder above my public_html folder (this is a dedicated server) and it tells me that I have no issues rendering a jpg file with spaces in the file name.

So now I'm trying to pull random images from the same folder, but can't seem to figure it out. Here is what I am doing that is NOT working.

I've created an image.php file with this code and put in my public_html folder:

and then I put this code in an html page in my public_html folder:

Now when I load this html page with this img tag, I get nothing. No error, no image, nothing but white space. I appreciate any insight anyone can provide.

Show more