note 31272 added to function.mkdir
| From: | dan at rack1 dot php dot net | Date: | Wed, 16 Apr 2003 01:55:24 +0000 |
| Subject: | note 31272 added to function.mkdir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46666@lists.php.net to get a copy of this message | ||
I had a problem with mkdir on my box running safemode -- it didn't work! To get around it, I
used the ftp functions.
<?php
$connection = ftp_connect('someftpsite.com');
$username = 'user';
$pass = 'pass';
$login_result = ftp_login($connection,$username,$pass);
// check to make sure you're connected:
if ((!($login_result)) or (!($connection)))
{
// error....do something
}
else
{
// we're good to go -- the connection was made
ftp_chdir($connection,'/some/dir/');
ftp_mkdir($connection,'anotherdir');
ftp_close($connection);
}
?>
It's not nearly as nice as being able to make the directory with a single function, but if
you're getting funny errors, it may just do the job.
-Dan
--
http://www.php.net/manual/en/function.mkdir.php
http://master.php.net/manage/user-notes.php?action=edit+31272
http://master.php.net/manage/user-notes.php?action=delete+31272
http://master.php.net/manage/user-notes.php?action=reject+31272