You are here: Re: The principle of include files in PHP, not as in C++ « PHP Programming Language « IT news, forums, messages
Re: The principle of include files in PHP, not as in C++

Posted by Rik Wasmus on 10/16/07 07:32

On Tue, 16 Oct 2007 03:49:05 +0200, duzhidian@gmail.com =

<duzhidian@gmail.com> wrote:
> Thanks for your guys info. All your suggestions is to use absolute
> path somewhere.

I gave you a perfectly serviceable solution.
1. Store current working dir somewhere ( $cwd =3D getcwd(); ).
2. Set current working dir to the one of the file =

( chdir(dirname(__FILE__)); ).
3. Do a relative include/require/fopen/etc..
4. Restore the current working dir to the one you stored ( chdir($cwd); =
).
-- =

Rik Wasmus

 

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

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