Jump to content

Archived

This topic is now archived and is closed to further replies.

bob2006

Help With include

Recommended Posts

hello i need help with the include in my php script
<?php


 
SESSION_START();
header("Cache-control:private");
INCLUDE '/webmaster/functions.php';
if($_GET['act'] == "") {
if($_SESSION['username'] && $_SESSION['password']) {






i need the include to go to a differnt dic then i have the page
the page is in one and the fuctions is in a different one who do i do this

Share this post


Link to post
Share on other sites
If its in a different directory then the scrpt being servered. Use this:
INCLUDE '../webmaster/functions.php';
The .. tells to PHP to go one higher up the directory tree.

Share this post


Link to post
Share on other sites
Store the file to be included in a dir specified in the include_path in your ini file. Then all you need is

include 'functions.php';

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.