using php's require (2 posts)

  1. iperez_genius
    Posted 4 years 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
    Posted 4 years 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'); ?>


    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