You are here: Re: PHP 5 relative paths don't work?? « PHP Programming Language « IT news, forums, messages
Re: PHP 5 relative paths don't work??

Posted by lorento on 07/28/06 04:35

Check your php.ini there is include_path configuration. Add your
directory you want as relative part.

Other method use dirname() function. E.g for include file in the same
directory :

include dirname(__FILE__)."/file.php";

---
http://www.cookdojo.com
http://www.deshot.com

Max wrote:
> Hello -
>
> Just switched to PHP 5 and just realized that all my scripts with
> relative paths for require statements no longer work unless I put the
> absolute path. Usually, if the file is in the same directory I would us
> the following statement:
>
> require 'file.php';
>
> Now I'm having to use:
>
> require '/var/www/html/file.php';
>
> Do I just need to convert everthing to absolute, or is there something
> I'm missing somewhere?
>
> Thanks,
> Max

 

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

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