You are here: Re: [PHP] Trouble moving directory « PHP « IT news, forums, messages
Re: [PHP] Trouble moving directory

Posted by Robin Vickery on 10/13/05 14:07

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация