Opening a file / not found

Alles, was PHP betrifft, kann hier besprochen werden.

Opening a file / not found

Postby mickeymouse » 01. March 2012 19:13

I have this as my code

"<a href=\"AFI_$Row[7].jpeg\">$Row[7]</a>" // ($Row[7]="MYPicture")

This gives my user the link "MyPicture" but clicking the link = error 404 Object Not Found.
(To my recollection, this worked in the previous version of XAMPP)

How can I get my user to open this "MyPicture.jpeg" file (which resides in the same directory as all my web php files)?

Thank you
mickeymouse
 
Posts: 36
Joined: 08. March 2009 06:10
Location: France & Canada
XAMPP Version: 5.6.3
Operating System: Win 7 Family Prem Ed (64 bit?)

Re: Opening a file / not found

Postby Altrea » 01. March 2012 20:12

check your \xampp\apache\logs\error.log which path or file apache cannot find.
Because the user clicks on a path where the script is already processed by Apache it can't be a Apache or PHP issue (exept if the URL is not processed correctly).

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6536
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: Opening a file / not found

Postby mickeymouse » 02. March 2012 00:05

My apologies!
It was my error. I had changed the name of the file from AFI... to AFP... and just couldn't see the error when I was looking at my code even after I had checked the file name.
However, the other thing that was wrong was that although the file is listed as a "jpeg" type file and that's what I used in my code, the extension is actually "jpg" and I therefore need to use "jpg".

Re your suggestion to looking up "\xampp\apache\logs\error.log", I couldn't find this log. I did a search of my complete hard disk but no luck. I can only assume it wasn't installed at installation time. Can you tell me how to get this log.

Many thanks
mickeymouse
 
Posts: 36
Joined: 08. March 2009 06:10
Location: France & Canada
XAMPP Version: 5.6.3
Operating System: Win 7 Family Prem Ed (64 bit?)


Return to PHP

Who is online

Users browsing this forum: No registered users and 2 guests