By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,061 Members | 1,523 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,061 IT Pros & Developers. It's quick & easy.

Upload (unable to read file)

P: n/a
hi, im trying to upload a file. I tried many ways but it always
return the same error...

Unable to open c:\file.jpg for reading.

the file exists, but any file gives me the same error..

anyone know what is happening??

thanx
Ruddy
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ruddy wrote:
hi, im trying to upload a file. I tried many ways but it always
return the same error...

Unable to open c:\file.jpg for reading.

the file exists, but any file gives me the same error..

anyone know what is happening??


<?php
$f = "c:\file.jpg";
?>
$f does *NOT* point to the file named "file.jpg" on the root of the
"c:" drive!

it points to the file "\file.jpg" on the current directory of the c:
drive.

"\f" is a single character!
If you're using single quotes, or getting the file name in some other
way, please disregard what I said up there and post your code.
HTH
--
..sig
Jul 17 '05 #2

P: n/a

On 18-Nov-2003, ru**********@yahoo.com.br (Ruddy) wrote:
hi, im trying to upload a file. I tried many ways but it always
return the same error...

Unable to open c:\file.jpg for reading.

the file exists, but any file gives me the same error..

anyone know what is happening??


It would be terribly helpful if you would show us the code.

My guess is you are trying to read a file on the client from the server. It
can't be done with fopen(). You can use <input type=file and the $_FILE
array.

--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to ja*********@willglen.net (it's reserved for spammers)
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.