Jump to content
Larry Ullman's Book Forums

Trouble With Ch 11 Images.Php


Recommended Posts

I'm having some trouble with images.php in Chapter 11.

The script displays the contents of my uploads folder correctly but when I click on a link to one of the images an empty popup window appears and then quickly disappears. Then a box pops up that says:

You have chosen to open show_image.php which is a shell script. What should Firefox do with this file? And then gives you a list of programs to chose from.

I also ran images.php in Chrome and Safari. They just open an empty popup window.

I also tried using the scripts provided with the book and when I click on a link to one of the images nothing happens.

What am I doing wrong?

 

Thank you.

Link to comment
Share on other sites

Are you typing the address to the page in the address bar, or are you browsing to it? You should be typing //localhost/path_to/images.php (replace path_to with the names of any sub-folders that images.php might be in).

 

The message you are getting regarding a shell script makes it sound like the script is not being run through the web server, which is required for php scripts.

  • Upvote 1
Link to comment
Share on other sites

Thanks for replying. I finally got it working. I think it was just a series of typos. I used some PHP echo statments and a JavaScript alert statement to figure out that the file name was not being passed in the url correctly. I fixed the errors. But what is interesting is that the downloaded files from the book still don't work for me. Oh well. It's done.

Thanks again for your time.

Link to comment
Share on other sites

 Share

×
×
  • Create New...