Home > Backend Development > PHP Tutorial > ,这段代码爆错。

,这段代码爆错。

WBOY
Release: 2016-06-13 10:44:33
Original
802 people have browsed it

求助,这段代码爆错。。

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->function MU( $url, $type, $vars = array( ), $domain = false ){        $path = explode( "/", trim( $url, "/" ) );        $model = strtolower( $path[1] );        $action = isset( $path[2] ) ? strtolower( $path[2] ) : "";        $http = ud( $path );case "article" :default :        switch ( $type )        {                if ( !isset( $vars['id'] ) )                {                        unset( $path[0] );                        $url = implode( "/", $path )."/";                        $newurl = $url;                }                else                {                        if ( $UN_1 || strtolower( GROUP_NAME ) == strtolower( c( "DEFAULT_GROUP" ) ) )                        {                                unset( $path[0] );                                $url = implode( "/", $path )."/";                        }                        $newurl = $url.$vars['id'].$vars['suffix'];                }                break;        case "typelist" :                if ( strtolower( GROUP_NAME ) == strtolower( c( "DEFAULT_GROUP" ) ) )                {                        unset( $path[0] );                        $url = implode( "/", $path );                }                $newurl = $url.$vars['suffix'];                break;        }        return $http.$newurl;}
Copy after login


运行后就爆以下错误:
Parse error: syntax error, unexpected T_CASE in E:\usr\www\App\Common\Lib.php on line 33

上面那段代码就是33行的所有代码。。。

求助 这哪里出错了。。。

------解决方案--------------------
$path = explode( "/", trim( $url, "/" ) );
$model = strtolower( $path[1] );
$action = isset( $path[2] ) ? strtolower( $path[2] ) : "";
$http = ud( $path );
case "article" :

這一段上邊的switch呢?
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template