Hello,

Have had similar problems with filenames containing spaces and, I imagine
the & symbol might cause some problems but maybe not.  Check if the file
spaces are '%20', I also recommend removing odd characters with an
eregi_replace statement ($filename = eregi_replace ("[^a-z0-9]","",
$filename);).  I think you will find that the spaces are the problem.

Daryl

-----Original Message-----
From: Ian Young [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 10:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] File upload HELP!!!


Tearing our hair out here. Have been trying for ever to get files to upload.
The good news. We are connecting to database and obtaining information on
filename, size, type etc but no file!.

Have made a tempdir d-ol/temp and have configured php.ini to reflect
this.Maximum file size is the same a s maximum for server.

Using the fileman script to test everything.

Following error message found.

Warning:  stat failed for terms & conditions.doc (errno=2 - No such file or
directory) in /www.****/d-ol/fileman.php on line 109
Warning:  fopen("terms & conditions.doc", "r") - No such file or directory
in /www.****d-ol/fileman.php on line 110
Warning:  Supplied argument is not a valid File-Handle resource in
/www.*****/d-ol/fileman.php on line 111
Warning:  Supplied argument is not a valid File-Handle resource in
/www.iysearch.net/d-ol/fileman.php on line 112

Lines 108 to 112 read as follows:
        $file_name = $write_dir.$input_file_name;
        $file_size = filesize ($file_name);
        $fp = fopen ($file_name, 'r');
        $data = addslashes (fread ($fp, $file_size));
        fclose ($fp);
Hope you can help

Ian J Young
Principal
Ian Young Executive Search
39 Palmerston Place
Edinburgh
EH12 5AU

**************************************************IMPORTANT*****************
***********************************************************

This e-mail contains information which is confidential and may also be
privileged. It is for the exclusive use of the intended recipient(s). If you
are not the intended recipient(s) please note that any form of,
distribution, copying or use of this e-mail or the information in it is
strictly prohibited and may be unlawful. If you have received this in error
please inform us at the above address then delete the e-mail and destroy any
copies of it. Thank you.




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

Reply via email to