Thanks for the replies..
The CHMOD's were working.. i suspect its that they're either not "sticking".. my server admin isn't one I'd call "good" really.. he calls ME with PHP questions etc.. he just finally installed PHP on the local isp server because I was nagging him for the last year.. now he's asking me questions about installing mysql
I know how to use chmod() in php, but I did learn a bit more about chmod etc.. through my research and your messages guys.. thanks
It turned out I was just up a little late and was going about it wrong.. mixed up my functions.. was trying to use dir() or something... I straightened it out today using the functions i meant to be using - opendir() then readdir() and finally is_dir()..
maybe i should up the caffeine and keep my php dictionary a little handier for reference
anyway I whipped it up once i realized where I goofed.. here's a function I put together.. haven't given it a really good look over yet but I'll throw it up here anyhoo. tear it up and tell me how much better it could be... i know it could be more universally useful, but for my little project its just what I need
code:
function dirt($path, $dirt_df = 0){
if($dir = opendir($path)){
$d = 0; $f = 0;
while(false !== ($file = readdir($dir))){
if(is_dir($path."/".$file)){
$dirt_directories[$d] = $file;
$d++;
}else{
$dirt_files[$f] = $file;
$f++;
}
}
closedir($dir);
if($dirt_df == 0){
return $dirt_directories;
}else{
return $dirt_files;
}
}
}
as you can see it should return an array of EITHER the directories OR files in a path.. I haven't tested it out really but its time for bed
[edit]ooops... left some sloppy "test" code in there.. not there now[/edit]
[This message has been edited by Lurch (edited 07-23-2003).]
[This message has been edited by Lurch (edited 07-23-2003).]