gpt4 book ai didi

php - tests.php 问题 - sipp webfrontend

转载 作者:行者123 更新时间:2023-11-29 03:00:38 26 4
gpt4 key购买 nike

我正在尝试在 centos 6.5 服务器上安装一个名为 sipp webfrontend 的基于 PHP 的应用程序。

我认为我已满足以下所有要求:

  • LAMP 环境(Linux、Apache、Mysql、PHP)
  • 至少 0.5MB 可用磁盘空间
  • 具有创建数据库和表权限的有效 MYSQL 用户
  • 在 apache 的 www 子文件夹或至少其子文件夹之一中或之下写入访问权限(直接或通过 FTP、SSH ...)
  • 至少安装了一个版本的 SIPp

但是当我将浏览器指向 URL 时,我得到以下信息:

。 * * * * 结束许可 * * * * */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">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><a href="tests.php" class="breadcumbs">Tests overview </a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><? if($admin) { ?><a href="test_detail.php?action=new">&raquo; create new test <img src="pix/new.gif" width="14" height="14" border="0" alt="view"></a><? } ?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><table cellpadding="3" cellspacing="2" border="0" class="datatable">
<tr>
<th><a href="?sort=name">name<? if($sort=="name") { ?>&nbsp;<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") { ?>&nbsp;<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") { ?>&nbsp;<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") { ?>&nbsp;<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") { ?>&nbsp;<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>&nbsp;</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>

最佳答案

使用以下更改修改 php.ini:short_open_tag = On

关于php - tests.php 问题 - sipp webfrontend,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24207360/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com