You are here: Re: problem with 'include' and 'file_exists' function « PHP Programming Language « IT news, forums, messages
Re: problem with 'include' and 'file_exists' function

Posted by Gordon Burditt on 11/25/06 06:12

> "include('inc.php')" will work problely
>but "include('./inc.php') doesn't work ..

There are plenty of situations where this will happen. If a file
name begins with ./, it will be looked up with include_path relative
only to the current working directory, not the current script.

Are you SURE you know what the current working directory is when
the script is started?

>both file_exists('inc.php') or file_exists('./inc.php') didn't return
>the right value.this always show "file doesn't exists'

include() uses include_path to search for files.
file_exists() doesn't.


>my environment is win2003+iis+php5
>
>how to fix it ?

The fix may be to correct the "right" value. Don't think that!

 

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

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