Reply to Re: About directory

Your name:

Reply:


Posted by roby on 01/12/07 04:01

Thanks for the help... it works.
Noodle wrote:
> 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.
>
> Try using the function is_dir() to test if a dir exists and is of type
> directory.
>
> http://www.php.net/manual/en/function.is-dir.php
>
> <?php
> mkdir("test");
> if(is_dir("test")){
> chdir("test");
> }
> ?>

[Back to original 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

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