WordPress.org

Ready to get started?Download WordPress

Forums

including a php file outside wordpress (2 posts)

  1. gab1982
    Member
    Posted 6 years ago #

    I need to include a file outside of the wordpress directory i have looked at the support document but can't seem to get it working, is there a way i can do this without moving the file i want included.

  2. Anonymous
    Unregistered
    Posted 5 years ago #

    you need the following line on top of your .php file:

    <?php require_once("./wp-blog-header.php"); ?>

    If it is sitting outside the wordpress installation directory just change the url to reflect that.

Topic Closed

This topic has been closed to new replies.

About this Topic