help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Alias
Forum Newbie
Posts: 1
Joined: Fri Oct 17, 2003 7:40 am

help

Post by Alias »

is there a way (in php or perl or some other language, php prefered) to chmod all the files and folders in your site at once??? i need them all at 777
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

Yeah, I guess so. Use opendir() to open up a directory, then list out all the files with readdir(), and use a loop to chmod each file with chmod().

I'm sure that would work,

-Nay
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Also take a look at http://php.net/chmod , especially the user comments.

I'd also double check you need them all 777 as this is rarely the case as could have possible security implications ;)
Post Reply