How to change permissions of uploaded file? |
[eluser]admiral[/eluser]
Hello, after moving my project to a new server I've got a problem with permissions of uploaded files (using File Uploading Class). How can I define file permissions before uploading or change it after uploading (php function chmod or something)?
[eluser]codebreaker21[/eluser]
There is a php function for this : chmod http://php.net/manual/en/function.chmod.php If you get an error while using it you can try this : http://www.php.net/manual/en/function.chmod.php#68384 Codebreaker21.
[eluser]admiral[/eluser]
Yes, I know this function. But I have no idea how to use it in conjunction with CI's do_upload(). I mean, I don't know how to determine the name of saved file which doesn't have to be the same as the name of local file.
[eluser]codebreaker21[/eluser]
http://ellislab.com/codeigniter/user-gui...ading.html Take a look at $this->upload->data() .This should be exactly what you need.
|
Welcome Guest, Not a member yet? Register Sign In |