View Single Post

  #1 (permalink)  
Old 12-07-2003
michris
 
Posts: n/a
Default php mkdir touch time-date problem

Dear all,

I have a problem which I can not explain-understand.
I hope someone can help me.
I use php under WinXP.

I want to copy a dir to another location, afterwards I want to set the
date and time stamp identical as the original dir. But for some reason,
I get the following error message :
Warning: touch(): Utime failed: Permission denied in C:\PHP\run.php on
line 138

$key_search = new dir name
$key = org dir name

if (mkdir($key_search,0777))
{
echo "Succesfully made dir : $key_search<BR>";

// chmod($key_search, 0777); // I tried with this line as well! but I
doesn't work
touch ($key_search,filemtime($key));// set back original date and time
}
else
{
echo "Error : Failed to make dir : $key_search<BR>";
}


My dir is made, but with the time stamp of creation!!


Many thanks in advance.
Michris



Reply With Quote