| 
	
 | 
 Posted by My Pet Programmer on 12/24/07 04:10 
Dev said: 
> Hello All, 
>  
> i am unable to upload file using following code: 
>  
> chmod("upload", 0777); 
> move_uploaded_file($_FILES["file"]["tmp_name"], "./upload/". 
> $_FILES["file"]["name"]); 
> chmod("upload", 0755); 
>  
> what wrong in this code any one help me. 
>  
> Thanks in advance 
>  
> Dev 
 
I doubt your PHP process has root access to your server. You'll need to  
either change the permissions on the directory you're uploading to  
manually outside the program of write a shell script that does it and  
call that from PHP, then write another one that locks it back up and  
call it from PHP as well, but I'm not even sure that would work, unless  
you su'd first, which I don't think I would ever consider doing from PHP. 
 
~A!
 
  
Navigation:
[Reply to this message] 
 |