mariovaldez.net
http://www.mariovaldez.net/webapps/forums/

Correct path to folder...
http://www.mariovaldez.net/webapps/forums/viewtopic.php?f=11&t=107
Page 1 of 1

Author:  Meek [ 24 Aug 2004, 11:43 ]
Post subject:  Correct path to folder...

I add this in the top of every page where I use this login script:

Code:
<?php
session_start();
$slogin_noauthpage = 0;
$slogin_pagetitle = "Name of page";
include_once ("slogin_lib.inc.php");
?>


Now, I keep all the login script files in a folder named 'login' so how do I change this path:
Code:
include_once ("slogin_lib.inc.php");
if the page is located in the root outside the 'login' folder?

I have tried
Code:
include_once ("/login/slogin_lib.inc.php");
but it doesn't seem to work. Yeah, I'm a newbie to php but I'm trying...

Thanks in advance. :wink:

Author:  Meek [ 24 Aug 2004, 14:03 ]
Post subject:  Ok, I got it...

Google is your friend... :D

I used:
Code:
include_once($_SERVER['DOCUMENT_ROOT']."/login/slogin_lib.inc.php");

Author:  mvaldez [ 24 Aug 2004, 18:13 ]
Post subject:  Good you found it...!

Meek:

> I used: include_once
> ($_SERVER['DOCUMENT_ROOT'].
> "/login/slogin_lib.inc.php");


Good you find the answer!

I'll add this as a tip for the next release. :wink:


Regards,

Mario A. Valdez-Ramirez.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/