Thanks, but it make the test to move on to other things like,
size($filename) which tells me the file does not exist.

Chris
"Manuel VáZquez Acosta" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It may be an OS feature file_exists relies on...
> But you can use is_uploaded_file() function to check whether the file
exists
> or not.
>
> Manu.
>
>
> "Chris Williams" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I'm again trying to understand differences in Apache and Windows
installs
> of
> > PHP when I try to upload a file to the server. It seems on Windows, I
> can't
> > get the file I'm uploading.
> >
> > To try to understand this I created a very simple html form that uploads
a
> > text file to the server's TEMP directory using:
> >
> > <form action="Upload.php" method="post" enctype="multipart/form-data">
> >
> > The script Upload.php contains the following:
> >
> > $filename = $_FILES['datafile']['tmp_name'];
> > echo "filename: " . $filename ."<br>";
> >
> > if (file_exists("$filename")) {
> >     print "The file $filename exists";
> > } else {
> >     print "The file $filename does not exist";
> > }
> >
> > echo "<br><br>";
> >
> > @readfile($filename);
> >
> > echo "<br><br>";
> >
> > Now the file seems to have been copied to the server because filename
> prints
> > out the path to the file and @readfile($filename) displays the content
of
> > the file. However, file_exists tells me the file does not exist. I also
> > tired getting file size but again I got an error no file exists.
> >
> > Of course this all works on Apache. What is up with this?
> >
> > Thanks
> > Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to