php mkdir touch time-date problem

This is a discussion on php mkdir touch time-date problem within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Dear all, I have a problem which I can not explain-understand. I hope someone can help me. I use ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #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
  #2 (permalink)  
Old 12-14-2003
Dude Nr2
 
Posts: n/a
Default Re: php mkdir touch time-date problem

Dear Michris,

I tried to do this in PHP too :
Make a copy of a directory while keeping the date stamp of that directory.
And it does not work, I cannot find a way to change the date of a directory
(in PHP under windows).

Isn't there really anybody who has ever done this in PHP (under windows) ???

Regards
DudeMan Nr 2


"michris" <michris_nospam@oostendenaar.be> wrote in
news:EcIAb.778$Lf5.150561162@hestia.telenet-ops.be:

> 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:38 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0