June 20th, 2000, 12:16 PM
Im want to be able to upload word documents and im using the script below. However its not working and the error message shown below
This is the HTML for the form:
<FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="File" name="file" size="30" maxlength="255">
<INPUT TYPE="submit" VALUE="upload">
This is the php script upload.php:
print("document has been uploaded");
print("document not copied");
This is the error message displayed:
Warning: Unable to create '/big/dom/xsuntopuser/www/files/Rosscv.doc': Permission denied in /big/dom/xsuntopuser/www/add_upload.php on line 31
document not copied
upload tmp file: /big/dom/tmp/phpxRP5LY
file size: 23040
file type: application/msword
Hope you can Help
June 20th, 2000, 02:03 PM
You may want to check the permissions on the directory you are trying to upload to. You have to have write permissions on that directory.
June 20th, 2000, 05:30 PM
what is the scripting of "add_upload.php"?
June 21st, 2000, 09:27 AM
I didnt have write permissions to the required directory but ive got it sorted now and it works fine.
Thanks for your time
June 21st, 2000, 10:40 AM
I copy murf's script to upload file
However it is not working
Here is the error message:
Warning: Unable to open 'php2' for reading: No such file or directory in chpdevwwwupload.php3 on line 3
document not copied
Can anyone help me.
June 21st, 2000, 11:18 PM
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Warning: Unable to open 'php2' for reading: No such file or directory in chpdevwwwupload.php3 on line 3
You need to get rid of that in the php2 file name. It seem your on windows and i had the same problem with my scripts. I think the stripslashes() function will work for this
I never really tried it cuz i just turned on the magic_quotes option
June 22nd, 2000, 04:51 PM
I get rid of all the stuff in the upload_tmp_dir (php.ini) and I replace by a dot .
Now it is working fine