The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi
We have some pages that already use a database connection and include several functions files. I have tried including global.php but whatever method (chdir etc) I use gives errors.. Here's what I have on the page so far.. Code:
<? session_start(); require("db/connectguidedb.php"); require("cobrand.php"); require("checklogin.php"); require("../cms/functions/listings.php"); require("functions.php"); require("../member/functions/premiummembers.php"); //rest of page here ?> Code:
$cwd = getcwd(); chdir("../forum/"); require('global.php'); chdir($cwd); Code:
Warning: chdir(): No such file or directory (errno 2) in /home/xxxx/public_html/whatson/checklogin.php on line 4 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxx/public_html/whatson/functions.php on line 43 Invalid Request Code:
$intDirPos = strpos($_SERVER['SCRIPT_NAME'],"/",1); $strDirectoryCurrent = substr($_SERVER['SCRIPT_NAME'], 1, strpos($_SERVER['SCRIPT_NAME'],"/",1)-1); if($intDirPos!==false) { // we are calling from a sub directory chdir("../forum"); include("global.php"); chdir("../".$strDirectoryCurrent); }else{ // we are calling from the web root directory chdir("./forum"); include("global.php"); chdir($cwd); } Code:
Warning: main(../cms/functions/listings.php): failed to open stream: No such file or directory in /whatson/guide.php on line 5 |
#2
|
|||
|
|||
![]()
Try this
chdir(".."); chdir("./forum/"); |
#3
|
|||
|
|||
![]()
It seems you $cws don't get filled ok.
Maybe a stupid question, i asume you have a "<?php" in the top and a "?>" in the bottom of your checklogin file? |
#4
|
|||
|
|||
![]()
If I echo the $cwd variable I get something like:
/home/***/public_html/whatson which seems ok? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|