<?php class Blog extends Controller{ function index(){ echo"come blog"; } function comment(){ echo"blog comment!"; } } ?>
复制代码
那么这里页面显示的结果就是 blog comment 了 问题:如何带参数,可以带几个参数! 回答:首先说明的是可以带N个参数例如
PHP复制代码
<?php class Blog extends Controller{ function index(){ echo"come blog"; } function comment($id,$cid,$vid){ echo"blog comment!{$id},{$cid},{$vid}"; } } ?>