Parse error: syntax error, unexpected T_FUNCTION-php升级

搭建起PHPNOW1.5.6环境,导入完整的PHP项目,浏览器访问出错(Parse error: syntax error, unexpected T_FUNCTION),经核实,此错误是由于PHP低版本导致,phpnow1.5.6自带的PHP版本是5.2.14.要解决这个问题,需要将PHP升级.

PHPNow升级PHP版本为5.3.5的方法

phpnow下载地址:http://www.jb51.net/softs/12868.html

1,先把PHP5.3.5下载下来,在官网我是没找到VC6的版本,只能从Google搜了。

下载地址:php-5.3.5-Win32-VC6-x86.zip

2,将下载的解压至phpnow的安装目录,命名不能有中文,建议直接“php5.3”就可以了。

3,将“php-5.2.14-Win32/php-apache2handler.ini”复制到“php5.3中”。

4,修改apache配置文件“Apache-**/conf/httpd.conf”,将其中的“php-5.2.14-Win32”修改为“php5.3”。

5,再修改“php5.3/php-apache2handler.ini”文件,搜索“extension_dir =”,将后边的“php-5.2.14-Win32”修改为“php5.3”。

6,再回到根目录运行“PnCp.cmd”,输入“23”-回车,重启下apache就可以了。

以上目录说明:“php5.3”为第二步的解压目录,而“php-5.2.14-Win32”是原PHP5.2的目录。

以上过程仅为参考,因为系统及各种环境问题,不能保证100%成功。

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]

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

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试

关闭