【发布时间】:2010-06-24 18:31:06
【问题描述】:
为什么这不起作用?我正在尝试创建一个 php 用户配置文件 URL。
<?php
class Users extends Controller {
function Users() {
parent::Controller();
}
function index($id == null) {
if($id == null) {
redirect('/', 'refresh');
}
else {
$data['title'] = 'User Page';
$data['result'] = $this->users_model->get_all_data();
$data['userid'] = $id; // in the view, you can use $userid as a variable
$this->load->view('users',$data);
}
}
}
?>
解析错误:解析错误,在第 7 行的 C:\wamp\www\system\application\controllers\users.php 中需要 `')''
【问题讨论】:
标签: php codeigniter