Using spl_autoload causes errors when I include wp-load.php
I am trying to show blog posts outside of my WP blog install folder on my website – something I have done numerous times before.
I’m using the simple bit of PHP code:
define('WP_USE_THEMES', false); include('wp-load.php'); query_posts('showposts=1');
However, with this website I have also been using the PHP5 feature of spl_autoload and it appears to be the cause of this error as soon as I attempt to include wp-load.php as shown above:
Fatal error: Uncaught exception ‘LogicException’ with message ‘Class Translation_Entry could not be loaded’ in /mnt/domains/nobigdiffpool.com/html/blog/wp-includes/pomo/entry.php:10 Stack trace: #0 [internal function]: spl_autoload(‘Translation_Ent…’)
I’ve experimented with various things to try and fix this – namely adding to my include path for WP, but am completely stuck. Any ideas?
- The topic ‘Using spl_autoload causes errors when I include wp-load.php’ is closed to new replies.