如何解决这个问题 [英] How to solve this porblem
本文介绍了如何解决这个问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Parse error: syntax error, unexpected '(' in C:\Program Files (x86)\Ampps\www\mvc2\index.php on line 17<pre>$ctlr->$url[1]();
<?php include "inc/header.php"; ?>
<?php
include 'system/libs/Main.php';
include 'system/libs/PController.php';
$url = $_GET['url'];
$url = rtrim($url, '/');
$url = explode('/', $url);
include 'app/controllers/'.$url[0].'.php';
$ctlr = new $url[0]();
$ctlr->$url[1]();
?>
<?php include "inc/footer.php"; ?>
我尝试过:
我尝试使用阵列系统动态访问Controller& Method 。
What I have tried:
I try to dynamic access Controller & Method using array system.
推荐答案
ctlr->
ctlr->
url [1]();
url[1]();
<?php include "inc/header.php"; ?>
<?php
include 'system/libs/Main.php';
include 'system/libs/PController.php';
url =
这篇关于如何解决这个问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文