php includes from folder to folder

epic1231

New member
hey there all - i'm using a HTML site that i converted to php so that I can use the includes for certain scripts i want to run.

i use the following example

<?php include($DOCUMENT_ROOT . "/include/header.php"); ?>
or
<?php include("pm_inc.php"); ?>

the header and footer files are in the /include/ folder and the files i want to call the header and footer to are in the /folder2/ folder..

how do i call these files - using just the same method does not work as listed above, i've also tried public_html/username/foldername/ to no avail.

can someone help me on this?

Thanks,
Bill
 
PHP:
<?
include ("folder/filename.php");
?>

or you could use

PHP:
<?
require ("folder/filename.php");
?>

:pumkin:
 
Last edited:
it seems though when the file i am inserting this php into is in another folder seperate from the /include/ folder it does not seem to load the php - when using the code like this isn't it trying to call the php file from a subfolder of the folder the file is in?
 
Hey Epic, just to let you know.

4.2 Participants may not use signatures to run sales ads (including without limitation scams, pricing information and plan descriptions).
 
Back
Top