You are here: Re: About directory « PHP Programming Language « IT news, forums, messages
Re: About directory

Posted by Noodle on 01/11/07 21:50

roby wrote:
> Hello everyone, I'm a beginner in PHP and I want to ask about
> directory. How to check correctly if the directory already exist in the
> webroot? I've tried with this syntax:
> ...
> bool $state = mkdir( "test" );
> if ( $state == false ) chdir( "test" );
> ...
> but on the page there is a warning. How to solve this problem? Thanks
> in advance.

Or you could do something like this if you don't need the state
recorded...

<?

if(is_dir("test")){
chdir("test");
}

?>

 

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

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