Re: Trouble moving directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/13/05, -k. <telirum@xxxxxxxxx> wrote:
> --- Jasper Bryant-Greene <jasper@xxxxxxxxxxxxxxxxxx> wrote:
> > $source_dir = escapeshellarg( '/some/dir/Dir That Won't Move/' );
>
>
> Unfortunately escapeshellarg doesn't work for all cases, it will escape the " ' " in that example
> but it doesn't escape other characters such as " ) ". So...
>
> $source_dir = escapeshellarg( '/some/dir/Dir That (Won't Move)/' );
>
> ...fails as well. Any other ideas?

<?php
  rename("/some/dir/Dir That (Won't Move)/",  '/some/other/dir/');
?>

Or if you must use shell_exec(), use addcslashes() to escape the
annoying characters first.

 -robin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux