For help, this code burst into an error .. PHPcodefunctionMU ($ url, $ type, $ varsarray (), $ domainfalse) {$ pathexplode (& quot;, trim ($ url, & quot; & quot;); $ modelstrtolower 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?