Results 1 to 7 of 7
  1. #1

    Post Need help... PHP Error


    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...

  2. #2
    Quote Originally Posted by dezheavensent View Post
    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...
    post imong code brad, para matrace ang imong problema..

  3. #3

    Default Lain nasad ako error

    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...

  4. #4
    include ($configfile);
    include($settingsfile);
    dili pwede ani?

    include ('/rap_admin/config.php'); or include ('rap_admin/config.php');
    include ('/rap_admin/settings.php'); or include ('rap_admin/settings.php');

    ask lng...

  5. #5
    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..

  6. #6
    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

  7. #7
    Na solve na cya...

    Thanks for you ideas, it really helped me.

  8.    Advertisement

Similar Threads

 
  1. help php error sending email via localhost
    By roiancuares in forum Websites & Multimedia
    Replies: 5
    Last Post: 03-07-2013, 10:50 PM
  2. Need Help!! PHP WEB TEMPLATES
    By Master ThorJack in forum Websites & Multimedia
    Replies: 10
    Last Post: 02-03-2013, 01:43 PM
  3. need help: php error
    By snowleopard in forum Programming
    Replies: 4
    Last Post: 11-26-2011, 08:06 AM
  4. Need Help with this error message...
    By franzziss in forum Software & Games (Old)
    Replies: 2
    Last Post: 03-14-2008, 04:08 PM
  5. Need help, dll error on startup and cant delete trojan
    By Zuan in forum Software & Games (Old)
    Replies: 3
    Last Post: 03-04-2008, 10:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top