Re: Trouble moving directory

From: Date: Thu, 13 Oct 2005 11:07:22 +0000
Subject: Re: Trouble moving directory
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-224027@lists.php.net to get a copy of this message
On 10/13/05, -k. <telirum@yahoo.com> wrote: > --- Jasper Bryant-Greene <jasper@bryant-greene.name> 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

« previous php.general (#224027) next »