开发者社区> 问答> 正文

打开网站后台显示500内部服务器错误!

详细的错误显示如下:PHP Notice:  Undefined index:  action in D:\virtualhost\wk6478001\admin\login.php on line 18 ,请问代码怎么改?

<?php
/*********************/
/*                   */
/*  Version : 5.1.0  */
/*  Author  : RM     */
/*  Comment : 071223 */
/*                   */
/*********************/


define( "JIEQI_MODULE_NAME", "system" );
define( "JIEQI_ADMIN_LOGIN", 1 );
if ( $_REQUEST['action'] == "login" )
{
    define( "JIEQI_NEED_SESSION", 1 );
}
require_once( "../global.php" );
if ( !empty( $_SESSION['jieqiUserId'] ) || !empty( $_SESSION['jieqiAdminLogin'] ) )
{
    if ( empty( $_REQUEST['jumpurl'] ) )
    {
        $GLOBALS['_REQUEST']['jumpurl'] = JIEQI_URL."/admin/index.php";
    }
    header( "Location: ".$_REQUEST['jumpurl'] );
    exit( );
}
if ( isset( $_REQUEST['action'], $_SESSION['jieqiUserId'] ) )
{
    @session_regenerate_id( );
}
jieqi_loadlang( "users", JIEQI_MODULE_NAME );
jieqi_getconfigs( JIEQI_MODULE_NAME, "configs" );
if ( !isset( $_REQUEST['action'] ) )
{
    $GLOBALS['_REQUEST']['action'] = "";
}
if ( $_REQUEST['action'] == "login" && !empty( $_REQUEST['password'] ) || ( !empty( $_REQUEST['username'] ) && !empty( $_SESSION['jieqiUserUname'] ) ) )
{
    if ( empty( $_REQUEST['username'] ) && !empty( $_SESSION['jieqiUserUname'] ) )
    {
        $GLOBALS['_REQUEST']['username'] = $_SESSION['jieqiUserUname'];
    }
    if ( empty( $_REQUEST['jumpurl'] ) )
    {
        $GLOBALS['_REQUEST']['jumpurl'] = JIEQI_URL."/admin/index.php";
    }
    jieqi_useraction( "login", $_REQUEST );
    exit( );
}
include_once( JIEQI_ROOT_PATH."/admin/header.php" );
$self_fname = $_SERVER['PHP_SELF'] ? basename( $_SERVER['PHP_SELF'] ) : basename( $_SERVER['SCRIPT_NAME'] );
if ( !empty( $_REQUEST['jumpurl'] ) )
{
    $jieqiTpl->assign( "url_login", JIEQI_USER_URL."/admin/".$self_fname."?do=submit&jumpurl=".urlencode( $_REQUEST['jumpurl'] ) );
}
else
{
    $jieqiTpl->assign( "url_login", JIEQI_USER_URL."/admin/".$self_fname."?do=submit" );
}
if ( empty( $_SESSION['jieqiUserId'] ) )
{
    $jieqiTpl->assign( "jieqi_userid", 0 );
    $jieqiTpl->assign( "jieqi_username", "" );
}
else
{
    $jieqiTpl->assign( "jieqi_userid", $_SESSION['jieqiUserId'] );
    $jieqiTpl->assign( "jieqi_username", jieqi_htmlstr( $_SESSION['jieqiUserUname'] ) );
}
if ( !empty( $jieqiConfigs['system']['checkcodelogin'] ) )
{
    $jieqiTpl->assign( "show_checkcode", 1 );
}
else
{
    $jieqiTpl->assign( "show_checkcode", 0 );
}
if ( empty( $jieqiConfigs['system']['usegd'] ) )
{
    $jieqiTpl->assign( "usegd", 0 );
}
else
{
    $jieqiTpl->assign( "usegd", 1 );
}
$jieqiTpl->assign( "url_checkcode", JIEQI_USER_URL."/checkcode.php" );
$jieqiTpl->setcaching( 0 );
$jieqiTset['jieqi_contents_template'] = JIEQI_ROOT_PATH."/templates/admin/login.html";
include_once( JIEQI_ROOT_PATH."/admin/footer.php" );
?>

展开
收起
星羽天恒 2015-04-18 15:44:18 7651 0
3 条回答
写回答
取消 提交回答
  • 旺旺:nectar2。
    楼主您好,

    这是“杰奇”的程序吗?

    建议先在本地里多调试看看。

    祝您早日解决问题。
    2015-04-18 22:28:12
    赞同 展开评论 打赏
  • Re打开网站后台显示500内部服务器错误!
    加上error_reporting(0);打开后台网页显示PHP Notice: Undefined index: action in D:\virtualhost\wk6478001\admin\login.php on line 13
    2015-04-18 18:39:03
    赞同 展开评论 打赏
  • PHP程序员,业余无线电爱好者,呼号:BH9BHT,自由职业!
    回 楼主(星羽天恒) 的帖子
    error_reporting(0);
    在文件头加上这一行
    2015-04-18 17:36:27
    赞同 展开评论 打赏
问答分类:
PHP
问答地址:
问答排行榜
最热
最新

相关电子书

更多
如何运维千台以上游戏云服务器 立即下载
网站/服务器取证 实践与挑战 立即下载
ECS快储存加密技术 立即下载