WordPress.org

Ready to get started?Download WordPress

Forums

using php's require (2 posts)

  1. iperez_genius
    Member
    Posted 1 year ago #

    I feel a bit stupid asking this question however whenever I put this

    require './facebookapi/src/facebook.php';

    into my header of my theme the header crashes, crashing the entire site.

    I have tried using an absolute path to and it also breaks the page.

    What am i doing wrong?

  2. Tammie
    Member
    Posted 1 year ago #

    Are you following some tutorial or plugin details that is asking you to add this? Just trying to figure out what you are trying to achieve and get full picture if possible.

    Also, can you confirm you are adding like this:

    <?php require('./facebookapi/src/facebook.php'); ?>

    http://php.net/manual/en/function.require.php

    Depending on location you could try $_SERVER["DOCUMENT_ROOT"] to get the location.

Topic Closed

This topic has been closed to new replies.

About this Topic