Failed to include ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

Failed to include ?

Post by GeXus »

I received this error when trying to include a file


Warning: Failed opening 'http://localhost/dvd/home.php' for inclusion (include_path='.;c:\apache\php\pear') in c:\apache\htdocs\dvd\file.php on line 1

Any idea what it would do this? What is pear?

Thanks!
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

it means it can't find the file. You'll need to use the physical path anyway, not the virtual one.

the mention of pear was only because that is part of your includes path in php.ini.
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

If you want me to convert that to baby language so its easy for you to understand here you go.

A BAD include:

Code: Select all

include("Location:/images/pictures.html");
A GOOD include:

Code: Select all

include("Location:/path/from/root/public_html/images/pictures.html");
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

"Location:" will, I'd bet, make it fail. ;)
Post Reply