Please help me solve this PHP error:
Notice: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' in C:\wamp\www\RAPSystem\viewer.php on line 18
I really need your help badly...
Please help me solve this PHP error:
Notice: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' in C:\wamp\www\RAPSystem\viewer.php on line 18
I really need your help badly...
got it solved. Lain nasad ako error:
Warning: include(C:/wamp/www/rap_admin/config.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\RAPSystem\viewer.php on line 21
Warning: include() [function.include]: Failed opening 'C:/wamp/www/rap_admin/config.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\RAPSystem\viewer.php on line 21
Warning: include(C:/wamp/www/rap_admin/settings.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\RAPSystem\viewer.php on line 22
Warning: include() [function.include]: Failed opening 'C:/wamp/www/rap_admin/settings.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\RAPSystem\viewer.php on line 22
Ni exist man ang config.php and settings.php.
Mao ni ang code:
<?php
// ////////////////////////////////////////////////////////////
// v3.0.3
// Copyright ©2007 Rapidsys_tmpl_folder in Action Profits. All Rights Reserved
//
// The sale, duplication or transfer of the script to any
// person other than the original purchaser is a violation
// of the purchase agreement and is strictly prohibited.
//
// Any alteration of the script source code or accompanying
// materials will void any responsibility of Rapid Action
// Profits regarding the proper functioning of the script.
//
// By using this script you agree to the terms and conditions
// of use of the script.
// ////////////////////////////////////////////////////////////
$configfile = $_SERVER['DOCUMENT_ROOT']."rap_admin/config.php";
$settingsfile = $_SERVER['DOCUMENT_ROOT']."rap_admin/settings.php";
include ($configfile);
include($settingsfile);
function sys_downloadlink($oto){
return "$_SERVER[PHP_SELF]?action=dwnld&oto=$oto";
}
function sys_auto_optin() {
echo ($auto_optin = "");
}
function refstats($nickname)
{
return ($html = "Reseller/JV Stats Table will Show Here");
}
function catalog($nickname)
{
return ($html = "Your Product Catalog will Show Here");
}
$p="none";
if(isset($_REQUEST['p'])) {
$p = $_REQUEST['p'];
$sys_tmpl_folder='';
$filename = $sys_tmpl_folder.$p;
switch ($p)
{
case "zips" :
$filename = $sys_tmpl_folder."zips.html";
break;
case "squeeze" :
$filename = $sys_tmpl_folder."squeeze.html";
break;
case "download" :
$filename = $sys_tmpl_folder."download.html";
break;
case "oto" :
$filename = $sys_tmpl_folder."oto.html";
break;
case "otodownload" :
$filename = $sys_tmpl_folder."otodownload.html";
break;
case "taf" :
$filename = $sys_tmpl_folder."taf.html";
break;
case "ototaf" :
$filename = $sys_tmpl_folder."ototaf.html";
break;
case "expired" :
$filename = $sys_tmpl_folder."expired.html";
break;
case "invalid" :
$filename = $sys_tmpl_folder."invalid.html";
break;
case "invalidreferrer" :
$filename = $sys_tmpl_folder."invalidreferrer.html";
break;
case "partners" :
$filename = $sys_tmpl_folder."partners.html";
break;
case "partnerthanks" :
$filename = $sys_tmpl_folder."partnerthanks.html";
break;
case "affiliates" :
$filename = $sys_tmpl_folder."affiliates.html";
break;
case "affiliatethanks" :
$filename = $sys_tmpl_folder."affiliatethanks.html";
break;
case "soldout" :
$filename = $sys_tmpl_folder."soldout.html";
break;
case "affiliatetools" :
$filename = $sys_tmpl_folder."affiliatetools.html";
break;
case "presale" :
$filename = $sys_tmpl_folder."presale.html";
break;
case "offline" :
$filename = $sys_tmpl_folder."offline.html";
break;
case "affcenter" :
$filename = $sys_tmpl_folder."affcenter.html";
break;
case "afflogin" :
$filename = $sys_tmpl_folder."afflogin.html";
break;
case "chgaffdetails" :
$filename = $sys_tmpl_folder."chgaffdetails.html";
break;
case "getlogin" :
$filename = $sys_tmpl_folder."getlogin.html";
break;
case "goto_paypal" :
$filename = $sys_tmpl_folder."goto_paypal.html";
break;
case "from_paypal" :
$filename = $sys_tmpl_folder."from_paypal.html";
break;
case "payment_timeout" :
$filename = $sys_tmpl_folder."payment_timeout.html";
break;
case "giveaway" :
$filename = $sys_tmpl_folder."giveaway.html";
break;
case "fraud" :
$filename = $sys_tmpl_folder."fraud.html";
break;
case "comp" :
$filename = $sys_tmpl_folder."comp.html";
break;
case "subscriberoptions" :
$filename = $sys_tmpl_folder."subscriberoptions.html";
break;
default :
$filename = $sys_tmpl_folder.$p;
break;
}
}
# SHOW SELECTED TEMPLATE
# ______________________
$header = $sys_tmpl_folder."header.html";
$footer = $sys_tmpl_folder."footer.html";
if(is_file($filename))
{
@include($header);
include($filename);
@include($footer);
} else {
echo "WHAT".$p." not recognized";
}
?>
Thanks for your speedy reply...
dili pwede ani?include ($configfile);
include($settingsfile);
include ('/rap_admin/config.php'); or include ('rap_admin/config.php');
include ('/rap_admin/settings.php'); or include ('rap_admin/settings.php');
ask lng...
rap_admin lage na ang path nimo, unya sa report kay RAPSystem.. isynchronize lng ang directory names..
document root man na imong gamit, so make sure ni-exist na ang files kung asa imong document root..
Kutob sa mahimo, ayaw gamita ang DOCUMENT_ROOT nga global var. Kay daghan kaayo paagi pag configure sa apache. VirtualHost lang daan paksit na.
Daghan sad paagi pag solve sa imo prob. Ang nindot para nako kay sa start palang sa imo project, naa naka standard directory structure gina follow. Naay includes, controllers, ... etc folders. So pwede dayon ka mo dirname(__FILE__)/<relative_path>/config.php
Na solve na cya...
Thanks for you ideas, it really helped me.
Similar Threads |
|