Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
cost me an hour to get recursive switch to work in windows with php 5.2.0, so share it here. The key is backward slash in windows , this php version doesn't recognize forward slash as valid path separator for mkdir(), though other functions support forward-slashed paths just fine. The following example works in Windows:
<?php
$mypath="testdir\subdir\test";
mkdir($mypath,0777,TRUE);
?>
This doesn't work in windows:
<?php
$mypath="testdir/subdir/test";
mkdir($mypath,0777,TRUE);
?>
Copy link to clipboard
Copied
quote:
> cost me an hour to get recursive switch to work in windows with php 5.2.0,
> so
> share it here. The key is backward slash in windows , this php version
> doesn't
> recognize forward slash as valid path separator for mkdir(), though other
> functions support forward-slashed paths just fine. The following example
> works
> in Windows:
> <?php
> $mypath="testdir\subdir\test";
> mkdir($mypath,0777,TRUE);
> ?>
> This doesn't work in windows:
> <?php
> $mypath="testdir/subdir/test";
> mkdir($mypath,0777,TRUE);
> ?>
>
Copy link to clipboard
Copied
quote:
> cost me an hour to get recursive switch to work in windows with php 5.2.0,
> so
> share it here. The key is backward slash in windows , this php version
> doesn't
> recognize forward slash as valid path separator for mkdir(), though other
> functions support forward-slashed paths just fine. The following example
> works
> in Windows:
> <?php
> $mypath="testdir\subdir\test";
> mkdir($mypath,0777,TRUE);
> ?>
> This doesn't work in windows:
> <?php
> $mypath="testdir/subdir/test";
> mkdir($mypath,0777,TRUE);
> ?>
>
Copy link to clipboard
Copied