为什么welcome.php少了php的结束符?>
<?phpclass Welcome extends Controller {
function Welcome()
{
parent::Controller();
}
function index()
{
$this->load->view('welcome_message');
}
}
/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */
最后面没有加上"?>";是故意的还是怎么回事?这有什么说法么? 首先,没人说过 PHP 必须有结束符,PHP 手册里没这么说。
其次,这是一个非常好的编码习惯,参考 http://codeigniter.org.cn/user_guide/general/styleguide.html#php_closing_tag 我来告诉你把,中国有句俗话,人非圣贤,索能无过。
写代码的糊涂了,给忘了加结束符,
知道了吗? 楼上的回答是错误的!加了结束符才是失误。 看看我的头像,楼主就明白了 楼上那位真是人才...
页:
[1]