I figured out the permissions issue to allow gd to create image files, but I also need to create folders for those images. I've come up with a routine (below) but it fails to create the directories. I've made sure that the directory that the first directory is created in has the appropriate permissions, but it doesn't work.

<?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)
                        if (!mkdir($buildingPath))
                                print 'false <br>';
                else
                        closedir($buildingPath);
        }
        
?>


The paths to the folders its supposed to create are correct ($buildingPath), but it always prints false signaling that mkdir has failed.


This is the last remaining issue on getting my site finished. Well except for uploading, but I don't need that just yet.



Seth Willits
------------------------------------------------------------------------ ---
President and Head Developer of Freak Software - http://www.freaksw.com
Q&A Columnist for REALbasic Developer Magazine - http://www.rbdeveloper.com
Webmaster for REALbasic Game Central - http://www.freaksw.com/rbgames


"It's all about the belly fire."
-- David Sepe
------------------------------------------------------------------------ ---


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to