You are here: Re: Problem with require() and script under public_html « PHP Programming Language « IT news, forums, messages
Re: Problem with require() and script under public_html

Posted by philipscanlan@gmail.com on 04/28/06 05:54

Maybe this would work...

require_once("{$_SERVER['DOCUMENT_ROOT']}/Net/IPv4.php");

acrux14@hotmail.com wrote:
> Hi,
>
> I'm trying to include PEAR's Net_IPv4 module in a web PHP script I'm
> coding. Using PHP v4.4.0.
>
> Other scripts on this web server (not personal user scripts, but main
> site ones) call it with:
>
> require_once("Net/IPv4.php");
>
> and it works.
>
> My script is under my public_html directory and if I use that same line
> I get a "Fatal error: Call to undefined function: validateip() in
> /home/james/public_html/test/srt/srt-0_3.php on line 258".
>
> I thought that maybe PHP safe mode was on (theoretically it's not, but
> since I don't own that IPv4.php file...), so I placed my own copy of
> IPv4.php in my own public_html, then in the same dir as the script,
> then under Net directories in each of the two previous ones, always
> with the same error message.
>
> This server's include path is set to:
>
> include_path = ".:/usr/lib/php"
>
> According to my interpretation of the documentation, if I use
> "require_once("./IPv4.php");" and include IPv4.php in the script's same
> directory it should work... what am I missing here?
>
> Thanks for your help! :-)
>
> James

 

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

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