So I just declare at the beginning:
if(!is_dir($to_path))
mkdir($to_path, 0777);
The code works. But how can I make sure $from_path exists first and fails if
not?
Same thing?
if(!is_dir($from_path))
{
echo "failed";
exit;
}
The first time I ran it, I ran it with a non-existing $from_path direc
On Thursday 14 March 2002 11:37, jtjohnston wrote:
> You might have seen a version of this function:
>
> http://www.php.net/manual/en/function.copy.php
>
> I would like to rework this line:
>
> mkdir($to_path, 0777);
>
> where mkdir will ignore $to_path if
> the directory already exists.
2 matches
Mail list logo