dongliyi967823 2011-06-21 13:40
浏览 41

PHP警告:require_once(DIR_FS_SITE_CONTROL_INCLUDEScontrol_header.php)

I am setting up an existing site for some integration work written in PHP however whenever I try and launch the admin console I get this:

Warning: require_once(DIR_FS_SITE_CONTROL_INCLUDEScontrol_header.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\wwweflex-nutrition\website_control\index.php on line 21

Can any one point me in the right direction to fix this issue?

Cheers

Justin

*EDIT****

This is my index.php can you tell me where i should put this definition?

    <? require_once("../includes/configure.php");
  set_time_limit(1800);
require_once(DIR_FS_SITE_CONTROL."includes/admin_configure.php");


    if($Page !="")
    {
        if(file_exists(DIR_FS_SITE_CONTROL_ADMINSCRIPT.$Page.".php"))
        {
            if(in_array($Page,$PagePermissionArray) || in_array("*",$PagePermissionArray))
                require_once(DIR_FS_SITE_CONTROL_ADMINSCRIPT.$Page.".php");                     
        }
    }

    if(@$_REQUEST['Meta'] !="false")
        require_once(DIR_FS_SITE_CONTROL_INCLUDES."control_meta.php");
    ?>
<body leftmargin="0" rightmargin="0" marginwidth="0" topmargin="3" marginheight="3">    
<?php 
if(@$_REQUEST['Popup'] !="true")
    require_once(DIR_FS_SITE_CONTROL_INCLUDES."control_header.php");
    ?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td bgcolor="" align="center" valign="top">
            <table border="0" cellpadding="0" cellspacing="0" width="98%">
                <tr>
                    <td valign="top" align="center" style="padding-top:6px;">
                    <?
                        if(session_is_registered("InfoMessage") && $_SESSION['InfoMessage'] !="")
                        {
                    ?>      <table cellpadding="3" cellspacing="2" border="0" align="center" class="InsideTable">
                                <tr>
                                    <td valign="middle" width="20"><img src="<?=DIR_WS_SITE_CONTROL_IMAGES?>info.png"></td>
                                    <td><font color="Red"><b><?=$_SESSION['InfoMessage']?></b></font></td>
                                </tr>
                            </table>
                            <br>
                    <?      $_SESSION['InfoMessage']="";
                        }
                        elseif(session_is_registered("ErrorMessage") && $_SESSION['ErrorMessage'] !="")
                        {
                    ?>      <table cellpadding="3" cellspacing="2" border="0" align="center" class="InsideTable">
                                <tr>
                                    <td valign="middle" width="20"><img src="<?=DIR_WS_SITE_CONTROL_IMAGES?>error.png"></td>
                                    <td><font color="Red"><b><?=$_SESSION['ErrorMessage']?></b></font></td>
                                </tr>
                            </table>
                            <br>
                    <?      $_SESSION['ErrorMessage']="";
                        }

                    ?>
                    <!-------Start Here --------->
                    <? if($Page !="") 
                        {                       
                            if(file_exists(DIR_FS_SITE_CONTROL_FORMS.$Page.".php"))
                            {
                                if(in_array($Page,$PagePermissionArray) || in_array("*",$PagePermissionArray))
                                    require_once(DIR_FS_SITE_CONTROL_FORMS.$Page.".php");
                                else    
                                    echo"<b>You do not have permission to access the page.</b>";

                            }
                            else 
                            {
                                echo"<b>Page is under construction.</b>";
                            }
                        }
                        else 
                        {
                            echo "&nbsp;";
                        } ?>
                        <!-------End Here--------->
                    </td>
                 </tr>
            </table>
        </td>
    </tr>
</table>
<? 
if(@$_REQUEST['Popup'] !="true")
    require_once(DIR_FS_SITE_CONTROL_INCLUDES."control_footer.php");?>
    <script type="text/javascript">
    function InitCall()
    {
        $.ajax({
               type: "GET",
               url: "index.php",
               data: "",
               success: function(msg){
               }
             });

        setTimeout('InitCall()', 600000);
    }
    InitCall();
    </script>
    <?
$sk_timeend = explode(' ', microtime() );
$sk_timeend = $sk_timeend[1] + $sk_timeend[0];
echo "<!--".number_format($sk_timeend-$sk_timestart,3)."-->";   
?>
</body>
</html>
<? //@mysql_close();
   ob_end_flush();
?>

THanks

  • 写回答

3条回答 默认 最新

  • dongtan7201 2011-06-21 13:41
    关注

    Possible issues:

    • Included file path is incorrect.
    • Included file name is incorrect.
    • The file you included is deleted or you did not upload it.
    • If DIR_FS_SITE_CONTROL_INCLUDES is a constant then your are not defining it or defining it after require_once()
    • Or you want to do following:

      require_once(DIR_FS_SITE_CONTROL_INCLUDES . '/control_header.php');

    评论

报告相同问题?

悬赏问题

  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题
  • ¥20 RL+GNN解决人员排班问题时梯度消失
  • ¥60 要数控稳压电源测试数据
  • ¥15 能帮我写下这个编程吗
  • ¥15 ikuai客户端l2tp协议链接报终止15信号和无法将p.p.p6转换为我的l2tp线路