, This code burst into an error.

Source: Internet
Author: User
Tags parse error
For help, this code burst into an error .. PHPcodefunctionMU ($ url, $ type, $ vars = array (), $ domain = false) {$ path = explode (& quot;/& quot;, tri for help, this code burst into an error ..
PHP code
  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;}


After running, the following error occurs:
Parse error: syntax error, unexpected T_CASE in E: \ usr \ www \ App \ Common \ Lib. php on line 33

The above code is all the 33 lines of code...

An error occurred while asking for help...

------ Solution --------------------
$ Path = explode ("/", trim ($ url ,"/"));
$ Model = strtolower ($ path [1]);
$ Action = isset ($ path [2])? Strtolower ($ path [2]): "";
$ Http = ud ($ path );
Case "article ":

What about the switch in the previous section?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.