Uploading image - extra backslashes on my webhost!?
Posted: Thu Aug 15, 2002 9:39 am
I'm creating an upload script so that users can upload images of themselves into a directory. Unfortunately it doesn't seem to work on my webhosts server (LINUX I think.)
I coded it on my laptop which is a Windows ME machine but I don't understand why it works under windows but not under Linux.
The error message I get is:
Warning: Unable to open 'C:\\WINDOWS\\Desktop\\myphoto.jpg' for reading: No such file or directory
The line of code for the upload selector is just a browse input box:
<input type=file name=driverimage size=30>
and then:
Where on earth are those extra backslashes coming from and how do I get rid of them and make it upload my image!!
I coded it on my laptop which is a Windows ME machine but I don't understand why it works under windows but not under Linux.
The error message I get is:
Warning: Unable to open 'C:\\WINDOWS\\Desktop\\myphoto.jpg' for reading: No such file or directory
The line of code for the upload selector is just a browse input box:
<input type=file name=driverimage size=30>
and then:
Code: Select all
if (!$driverimage == "")
{
copy($driverimage, "$abpath/$imagename");
}