Upload (unable to read file)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ruddy

    Upload (unable to read file)

    hi, i´m 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
  • Pedro Graca

    #2
    Re: Upload (unable to read file)

    Ruddy wrote:[color=blue]
    > hi, i´m 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??[/color]

    <?php
    $f = "c:\file.jp g";
    ?>


    $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

    Comment

    • Tom Thackrey

      #3
      Re: Upload (unable to read file)


      On 18-Nov-2003, ruddy_pulido@ya hoo.com.br (Ruddy) wrote:
      [color=blue]
      > hi, i´m 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??[/color]

      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

      tom (at) creative (dash) light (dot) com
      do NOT send email to jamesbutler@wil lglen.net (it's reserved for spammers)

      Comment

      Working...