Ubuntu服务器未返回完整的php文件
我在digital ocean上运行的Ubuntu 14.04服务器没有将我的完整php文件返回到浏览器。我可以在浏览器的“查看源”选项中看到它 实际上,我的index.php文件当前位于/var/www/html/中,但我的php引用的一些文件位于html的父目录中,即/var/www/中。这会成为一个问题吗 我的实际php代码是:Ubuntu服务器未返回完整的php文件,php,ubuntu,Php,Ubuntu,我在digital ocean上运行的Ubuntu 14.04服务器没有将我的完整php文件返回到浏览器。我可以在浏览器的“查看源”选项中看到它 实际上,我的index.php文件当前位于/var/www/html/中,但我的php引用的一些文件位于html的父目录中,即/var/www/中。这会成为一个问题吗 我的实际php代码是: <? require_once("../includes/configure.php"); require_once(DIR_FS_SITE_CONTR
<? require_once("../includes/configure.php");
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 " ";
} ?>
<!-------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();
?>
但我从服务器到浏览器的所有信息都是:
<? require_once("../includes/configure.php");
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文件进行了测试,当时它运行良好。所以我假设php或mysql配置没有问题。我不知道这个特定的php有什么问题
另外,当我将一些include放在/var/www/内的html父目录中时,是否有问题
谢谢。Short-opening-tags@lafor,我用@lafor替换了所有的Short-tags,我是否需要将所有内容放在/var/www/html中,或者将index.php以外的一些文件放在html的父级中??