You are here: Re: problem in create new diretory.. « PHP « IT news, forums, messages
Re: problem in create new diretory..

Posted by James Benson on 10/14/60 11:32

try 0777 instead of 777


http://php.net/chmod





ganu ullu wrote:
> Hello all,
> I have created a new dir, with php code .. which is like that
>
> function mkDirE($dir,$dirmode=777)
> {
> if (!empty($dir))
> {
> if (!file_exists("./microsite/".$dir))
> {
> preg_match_all('/([^\/]*)\/?/i', $dir,$atmp);
> $base="";
> foreach ($atmp[0] as $key=>$val)
> {
> $base=$base.$val;
> if(!file_exists("./microsite/".$base)){
> if (!mkdir("./microsite/".$base,777))
> {
> echo "Error: Cannot create ".$base;
> return 2;
> }
> //echo "Inside mk";
> touch("./microsite/".$base."/index.php");
> $source = "./microsite/index.php";
> $destination = "./microsite/".$base."/index.php";
> $copy_file = copy($source,$destination);
> }
> }
> }
> else
> if (!is_dir($dir))
> {
> //echo "Error: ".$dir." exists";
> return "Error: ".$dir." already exists";
> }
> }
> return 0;
> }
> -----------------------------------------
> this will create a new folder in my root folder,
> Locally every thing is working fine
> but when I upload the files then in my live server dir is creating
> but with the permission 410 dr----x--t
>
> can any body help me ... wt is the problem ????
>
> thnx...
>

 

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

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