Hello,
I know how to make a php script to upload an image, store the info in a db and all, but you have to manually go and change the permission of the directory that you want to upload your images to.
Is there a way to use a script to change that folders directory permissions with an install file or something?
I am building a fully customizable website with php for someone and want them to just upload the folder (entire site) i give them, and then be able to start adding all their info and be able to upload images with out having to worry about whether or not the upload folder has the right permissions to be able to upload to.
Can some one please help me with this? Thank you in advance.
Folder Permission and PHP image Upload
Moderator: General Moderators
Re: Folder Permission and PHP image Upload
You can use chmod and its related function,if the code is being deployed on Linux box
Re: Folder Permission and PHP image Upload
so what if the users webserver is on a windows box? how does wordpress do it?
thank you by the way, this will be very helpfull
thank you by the way, this will be very helpfull
Re: Folder Permission and PHP image Upload
Not sure, But Imo, if the php gets the permission to get executed on the web server, it would let the php to do files upload with write permission.
Re: Folder Permission and PHP image Upload
So im guessing that this might work? http://us2.php.net/function.mkdir
Apparently if the directory is created with php then you can make the permissions what ever you want. Im going to give it a try and see what i come up with.
Apparently if the directory is created with php then you can make the permissions what ever you want. Im going to give it a try and see what i come up with.