[thelist] Re: uploaded files not readable - solved, solved, thank god!

Dunstan Orchard dunstan at 1976design.com
Tue Dec 2 07:47:57 CST 2003


Ahhhh... I have just gone from insane, feverish panic, to a delightful 
state of calm.

I solved my file upload problem, and it was (as is so often the case) 
all my fault.

I was missing one '.' someone where in my code, so when the script 
checked for the existance of a file, it couldn't find it.

For example:

file_exists('/original/'.$new_file_name)

doesn't work, but:

file_exists('./original/'.$new_file_name)

does.

Do to the odd nature of my script, there wasn't one clear pathway for 
all the images that failed, so tracking down the problem was a bit tricky.

Anyway, with the prompting of Tony Crockford I checked out my script 
again and happened to stumble across the typo.

So, distaster over, sorry for the panic, and remember that '.' next time 
you're referencing files :o)


Thanks very much - dunstan

-------------------------------------
Dorset, England
Work: http://www.1976design.com/
Play: http://www.1976design.com/blog/
Learn: http://webstandards.org/





More information about the thelist mailing list