* Thus wrote Seth Willits ([EMAIL PROTECTED]):
> <?php
> $path = "path/path2/path3/path4/path5";
> $buildingPath = "existingFolder";
> $pathComponents = split("/", $path);
>
>
> foreach ($pathComponents as $value) {
> $buildingPath = $buildingPath . "/" . $value;
> print $buildingPath . '<br>';
>
> if (opendir($buildingPath) == false)
There is a lot of overhead with using opendir just to see if the
directoy exists other alternatives you might want to use is:
php.net/stat
php.net/is_dir
Or you can use the system's mkdir command wich usually has a
paramater to make all directories if they don't exist:
`mkdir -p path/to/new/dir/`
> if (!mkdir($buildingPath))
> print 'false <br>';
A print("false $buildingPath<br>") might yield as to why it isn't
creating it.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php