I am trying a simple file upload , taken care of all the html aspects like :
<form name=form1 method=post action=submit_content.php enctype=multipart/form-data>
<input type=hidden name='MAX_FILE_SIZE' value=200000>
<input type=file name=file1>
<input type=text size=25 name=file_dir1>
</form>
I have given a textfield named file_dir1 for the user to specify the path and name with which he wants to upload the file.
On giving value to file_dir1 as 'dir/name/shilpa.gif' and on submitting this form I get the error like this :
Warning: Unable to create 'dir/name/shilpa.gif': Permission denied in /my/site/path/submit_content.php on line 11
File could not be stored.
I am using the PHP function copy (have tried move_uploaded_file but given same error) to upload the file. I also further tried changing the directory permissions but no effect.
Do I have to open an FTP connection and then upload the file ?
I also came across the settings in php.ini file which r :
upload_tmp_dir no value
safe_mode off
Can someone give me some hint ??
Thanks.