我试图在centos 6.5服务器上安装一个名为sipp webfrontend的基于PHP的应用程序。
我认为我已满足以下所有要求:
但是,当我将浏览器指向URL时,我得到以下内容:
. * * * * END LICENCE * * * * */ header("location: tests.php"); ?>
我在httpd.log文件中看不到任何内容。
有谁知道这里可能出现的问题?
代码
?
/*
* SIPp Webfrontend - Web tool to create, manage and run SIPp test cases
* Copyright (c) 2008 Mario Smeritschnig
* Idea, support, planning, guidance Michael Hirschbichler
*
* * * BEGIN LICENCE * * *
*
* This file is part of SIPp Webfrontend.
*
* SIPp Webfrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SIPp Webfrontend is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with SIPp Webfrontend. If not, see <http://www.gnu.org/licenses/>.
*
* * * END LICENCE * * *
*
*/
// Here the user gets an overview of existing tests and can sort or remove them.
session_start();
require_once "authentication.php";
require_once "db.php";
require_once "dbHelper.php";
require_once "helper.php";
$action = $_GET["action"];
$id = $_GET["id"];
// manage ascending and descending sortable colums
if($_GET["sort"] != "") {
if($_SESSION["s_sort"] != $_GET["sort"]) $order = "ASC";
else {
$order = $_SESSION["s_order"];
if($order == "ASC") $order = "DESC";
else $order = "ASC";
}
$_SESSION["s_order"] = $order;
$_SESSION["s_sort"] = $_GET["sort"];
}
// define default sort parameters
if($_SESSION["s_sort"] == "") $_SESSION["s_sort"] = "name";
if($_SESSION["s_order"] == "") $_SESSION["s_order"] = "ASC";
$order = $_SESSION["s_order"];
$sort = $_SESSION["s_sort"];
if($admin && $action == "del" && id != "") {
$tObj = new Test($id);
$tObj->remove();
}
$tObj = new Test();
$res = $tObj->getOverview($sort." ".$order);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/styles.css" rel="stylesheet" type="text/css">
<link href="css/bg.css" rel="stylesheet" type="text/css">
<script src="js/tooltip.js" language="javascript" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
function delTest(id, name) {
var check = window.confirm("Are you sure you want to remove the entire test ("+name+")?");
if(check) location.href = "?action=del&id="+id;
}
</script>
</head>
<body>
<? require_once "navigation/pagehead.php"; ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" height="10"> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><a href="tests.php" class="breadcumbs">Tests overview </a></td>
</tr>
<tr>
<td> </td>
<td><? if($admin) { ?><a href="test_detail.php?action=new">» create new test <img src="pix/new.gif" width="14" height="14" border="0" alt="view"></a><? } ?></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><table cellpadding="3" cellspacing="2" border="0" class="datatable">
<tr>
<th><a href="?sort=name">name<? if($sort=="name") { ?> <img src="<? if($order == "ASC") echo "pix/ascending.gif"; else echo "pix/descending.gif"; ?>" width="9" height="7" border="0" alt="view"><? } ?></a></th>
<th><a href="?sort=description">description<? if($sort=="description") { ?> <img src="<? if($order == "ASC") echo "pix/ascending.gif"; else echo "pix/descending.gif"; ?>" width="9" height="7" border="0" alt="view"><? } ?></a></th>
<th><a href="?sort=created">created<? if($sort=="created") { ?> <img src="<? if($order == "ASC") echo "pix/ascending.gif"; else echo "pix/descending.gif"; ?>" width="9" height="7" border="0" alt="view"><? } ?></a></th>
<th><a href="?sort=last_modified">last modified<? if($sort=="last_modified") { ?> <img src="<? if($order == "ASC") echo "pix/ascending.gif"; else echo "pix/descending.gif"; ?>" border="0" width="9" height="7" alt="view"><? } ?></a></th>
<th><a href="?sort=run_count">runs<? if($sort=="run_count") { ?> <img src="<? if($order == "ASC") echo "pix/ascending.gif"; else echo "pix/descending.gif"; ?>" border="0" width="9" height="7" alt="view"><? } ?></a></th>
<? if($admin) { ?>
<th> </th>
<? } ?>
</tr>
<?
$even = true;
while($row = mysql_fetch_object($res)) {
if($even) $bgcol = "#EEEEEE";
else $bgcol = "#DDDDDD";
?>
<tr style="background-color:<? echo $bgcol; ?>;" onMouseOver="this.style.background='#B9FAFD'" onMouseOut="this.style.background='<? echo $bgcol; ?>'">
<td onClick="location.href='test_detail.php?version=-1&id=<? echo $row->id; ?>'"><? echo $row->name; ?></td>
<td onClick="location.href='test_detail.php?version=-1&id=<? echo $row->id; ?>'"><? echo shorten($row->description, 40); ?></td>
<td align="center" onClick="location.href='test_detail.php?version=-1&id=<? echo $row->id; ?>'"><? echo $row->created; ?></td>
<td align="center" onClick="location.href='test_detail.php?version=-1&id=<? echo $row->id; ?>'"><? echo $row->last_modified; ?></td>
<td align="center" onClick="location.href='test_detail.php?version=-1&id=<? echo $row->id; ?>'"><? echo $row->run_count; ?></td>
<? if($admin) { ?>
<td align="center"><a href="javascript: delTest(<? echo $row->id; ?>, '<? echo $row->name; ?>')"><img src="pix/del.gif" width="14" height="14" border="0" alt="remove"></a></td>
<? } ?>
</tr>
<?
$even = !$even;
}
?>
</table>
</td></tr>
</table>
</body>
</html>
答案 0 :(得分:1)
使用更改short_open_tag = On