note 19751 deleted from function.mkdir by aidan
| From: | aidan@php.net | Date: | Sun, 03 Oct 2004 13:40:42 +0000 |
| Subject: | note 19751 deleted from function.mkdir by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77845@lists.php.net to get a copy of this message | ||
Note Submitter: bckman at ix dot netcom dot com
----
(Unix only)
If you are developing away from the office, remember you can only make a NEW directory using script
if you are writing to a directory for which you ( ie 'nobody') has WRITE permissions. If
you are developing away from your server, you may think you have write permissions (you were told
that the permissions had been set for 'nobody') but you may not have these.
Thus before you do anything test to see whetether the directory you are trying to write to has the
necessary permissions. I find the following useful.
<?php
$dirtotest="[directory name]";
//$bool= chmod($dirtotest,0775);
//echo $bool;
if(is_dir($dirtotest))
{echo "<br />".$dirtotest." is a directory<br />";}
else
{echo "Is NOT a directory<br />";}
if(is_readable($dirtotest))
{echo $dirtotest." is readable<br />";}
else
{echo $dirtotest." is NOT readable<br />";}
if(is_writable($dirtotest))
{echo $dirtotest." is writable<br />";}
else
{echo $dirtotest." is NOT writable<br />";}
if(is_executable($dirtotest))
{echo $dirtotest." is executable<br />";}
else
{echo $dirtotest." is NOT executable<br />";}
?>