|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
PHP experts, please help!
Hey, pretty basic question
is there a way with php, that when i run the script, it will make everything 0777 in a certain folder? Please Help |
#2
|
||
|
I know there is a way because I have seen some file managers do it. Not sure how though.
__________________
|
#3
|
||
|
as in CHMOD it automatically? Same here, I know there is a way, but havent a clue what it is
|
#4
|
||
|
i can chmod stuff when it's uploaded, i want to run a script tho, that will change all the chmod of every file in a certain folder...perhaps this is possible?
|
#5
|
||
|
It is!!
Check out php.resourceindex.com and see if they have a function that lets you do it.
__________________
|
#6
|
||
|
This is untested, but it is a start:
Code:
function chmodFiles($path){ if ($handle = opendir("$path")) { echo "current directory handle: $handle\n"; while (false !== ($file = readdir($handle))) { echo "Chmod: $file\n"; chmod("$file", 0755); } closedir($handle); } } Code:
chmod("$path/$file", 0755); Basically what it does is loops through all the files in the specified directory. I just don't know if the variable $files contains the full path, or just the file name. Hope this helps. IcI Ps... I got this from php.net, php.net has always been able to provide me an answer ;-) |
#7
|
||
|
http://server4.heavydatahosting.com/...ksquad/777.php
i get an error, read please, i need to do this, i have lots of direcetories, i need to make 777 lol...so much! |
#8
|
||
|
argh .
|
#9
|
||
|
ok i fixed it now... YES!
|
#10
|
||
|
What was wrong with it?
__________________
|
#11
|
||
|
don't know, but tried it in the real folder and it worked
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Here's a Graphics challenge for you 'experts' | zza1pqx | Sigs and Graphics | 38 | 04-04-2005 04:31 AM |
What u experts think? | Stoint | Sigs and Graphics | 5 | 01-26-2005 05:43 PM |
need help!any experts out there lol? | Fanta | Delta Force | 2 | 12-01-2004 02:16 PM |
European Wargame Experts | c00n | Gaming Talk | 0 | 04-04-2003 09:51 PM |
flash experts could sum1 do this for me........ | Protector | Sigs and Graphics | 26 | 12-27-2002 11:38 AM |