mkob mkob - 9 months ago 61
PHP Question

How do I fix simplepie? failed to open stream: No such file or directory

I am trying to pull in some posts from a remote wordpress site with simplepie. I have installed the library and put what I think is the right code at the top of the .php page.

Right now my it looks like:


$feed = new SimplePie();





?> {doc type}

But when I load my page it tells me:

Warning: require_once(../autoloader.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/27/9279927/html/LatestHOPE.php on line 2

Fatal error: require_once() [function.require]: Failed opening required '../autoloader.php' (include_path='.:/usr/local/php5_3/lib/php') in /home/content/27/9279927/html/LatestHOPE.php on line 2

What's up with that? Why is it telling me this?
I have autoloader.php in my root directory.

Answer Source

You have it in your root directory!? That is a strange location. However, if that is true, use


Perhaps you mean in your home directory? For that use

require_once('/home/<your username>/autoloader.php');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download