Parse error: syntax error, unexpected '?' in /home/ubuntu/workspace/vendor/laravel/framework/src/Ill

Parse error: syntax error, unexpected '?' in /home/ubuntu/workspace/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233

出现这个问题的原因是我装了php5 升级到php7.1,

php -v显示的是7.1却没有被web服务器调用

修复:

sudo a2dismod php5
sudo apt-get install libapache2-mod-php7.1
sudo a2enmod php7.1
重启服务器,即可
阅读更多
换一批

Parse error: syntax error, unexpected T_ELSE

10-22

rn求助 第121行到底哪里错了rnrn Parse error: syntax error, unexpected T_ELSE, expecting T_WHILE in E:\********\**** on line 121rnrnrn[code=PHP]helper( "admincp,license" );rndefine( "MUDDER_ADMIN", MUDDER_CORE."admin".DS );rn$_G['loader']->model( "admin", FALSE );rn$_G['admin'] =& $_G['loader']->model( "cpuser" );rn$admin =& $_G['admin'];rnif ( _get( "logout" ) )rnrn $admin->logout( );rn exit( );rnrnif ( empty( $admin->access ) )rnrn if ( !$_POST['loginsubmit'] )rn rn include( MUDDER_ADMIN."cplogin.inc.php" );rn exit( );rn rn $admin->login( );rnrnelse if ( $admin->access == "1" )rnrn if ( !_post( "admin_pw" ) && md5( _post( "admin_pw" ) ) != $admin->password )rn rn include( MUDDER_ADMIN."cplogin.inc.php" );rn exit( );rn rn $admin->update_sessions( );rn redirect( "admincp_login_wait", SELF );rnrnelse if ( $admin->access == "2" )rnrn redirect( "admincp_login_op_without", SELF."?logout=yes" );rnrnelse if ( $admin->access == "3" )rnrn redirect( "admincp_cpuser_colsed", SELF."?logout=yes" );rnrnelse if ( $admin->access == "4" )rnrn redirect( lang( "admincp_cpuser_city_access", $REE2F6A197E455A22562E4E6EB2A333C2['name'] ), SELF."?logout=yes" );rnrnif ( empty( $admin->id ) || $admin->id < 0 || !$admin->isLogin )rnrn redirect( "admincp_not_login", SELF );rnrn$module = _input( "module" );rn$act = _input( "act" );rn$in_ajax = 0;rn$in_ajax = _input( "in_ajax" );rn$_G['loader']->helper( "form" );rnif ( empty( $module ) || $module == "modoer" )rnrn dorn rn $module = "modoer";rn if ( empty( $act ) )rn rn $tab = "home";rn echo "\r\n\r\n ";rn echo lang( "admincp_title" );rn echo "\r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n";rn exit( 0 );rn rn if ( !$admin->check_access( "modoer" ) || !in_array( $act, array( "cpheader", "cpmenu", "cphome", "help", "admin" ) ) )rn rn redirect( "global_op_access" );rn rn $RE8075232DAAE3481BAEFB25BCC782D6C = MUDDER_ADMIN.$act.".inc.php";rn if ( !is_file( $RE8075232DAAE3481BAEFB25BCC782D6C ) )rn rn show_error( lang( "global_file_not_exist", "[ADMIN_DIR]".DS.$act.".inc.php" ) );rn rn include( $RE8075232DAAE3481BAEFB25BCC782D6C );rn $R9702B7A88A910873E2263A41450DC9B5 = array( "cpheader", "cpmenu" );rn if ( !$in_ajax || !in_array( $act, $R9702B7A88A910873E2263A41450DC9B5 ) )rn rn cpheader( );rn rn if ( $admin->tplname )rn rn if ( !is_file( MUDDER_CORE.$admin->tplname ) )rn rn show_error( sprintf( lang( "global_file_not_exist" ), $admin->tplname ) );rn rn include( MUDDER_CORE.$admin->tplname );rn rn if ( !$in_ajax )rn rn if ( in_array( $act, $R9702B7A88A910873E2263A41450DC9B5 ) )rn rn break;rn rn elsern rn cpfooter( );rn rn rn rn else if ( isset( $_G['modules'][$module] ) )rn rn if ( !$admin->check_access( $module ) )rn rn redirect( "global_op_access" );rn rn $RC068ABF2DAB8261A35D84F5EBF50C6E6 = "modules".DS.$module;rn require_once( MUDDER_CORE.$RC068ABF2DAB8261A35D84F5EBF50C6E6.DS."common.php" );rn if ( preg_match( "/^[0-9a-z\\_\\.]+\$/i", $act ) )rn rn $RE8075232DAAE3481BAEFB25BCC782D6C = MOD_ROOT."admin".DS.$act.".inc.php";rn if ( !is_file( $RE8075232DAAE3481BAEFB25BCC782D6C ) )rn rn show_error( lang( "global_file_not_exist", $_G['modules'][$module]['directory'].DS."admin".DS.$act.".inc.php" ) );rn rn include( $RE8075232DAAE3481BAEFB25BCC782D6C );rn if ( !$in_ajax )rn rn cpheader( );rn rn if ( $admin->tplname )rn rn if ( !is_file( MUDDER_CORE.$admin->tplname ) )rn rn show_error( lang( "global_file_not_exist", $admin->tplname ) );rn include( MUDDER_CORE.$admin->tplname );rn rn include( MUDDER_CORE.$admin->tplname );rn rn if ( $in_ajax )rn rn break;rn rn cpfooter( );rn rn elsern rn show_error( lang( "global_op_unkown" ) );rn rn rn elsern rn show_error( lang( "global_not_found_module", $module ) );rn while ( 0 );rnrn?>rn[/code]

没有更多推荐了,返回首页