How do I use WP functions outside a web context?
-
I am trying to use WP login/logout/authentication functions in a PHP script that is not running in a web context. The script is running on the command-line through a testing tool called PHPSpec.
PHPSpec ran my script fine before I added a dependency on the WP functions. I can call those functions within a web context without problem (using require_once “wp-config.php”) but it fails on the command-line with…
Fatal error: Call to a member function set_prefix() on a non-object in /var/www/hhy/wp-settings.php on line 211
Any ideas?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘How do I use WP functions outside a web context?’ is closed to new replies.