WordPress.org

Ready to get started?Download WordPress

Forums

include wp-load.php from another directory (1 post)

  1. Microchip
    Member
    Posted 1 year ago #

    Hello!
    I need to call a wp function from another php page in another server directory (specifically I need to use wp_clear_auth_cookie();)

    So I included in /site/logoff.php this code:

    require_once $_SERVER["DOCUMENT_ROOT"]."/wordpress/wp-load.php";
    wp_clear_auth_cookie();

    but it doesn't work.
    If I copy /site/logoff.php in /wordpress/logoff.php, it works!
    I need to use this code from /site/!

    How can I resolve???

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic