解析错误:语法错误,意外的“<”,预期为T_STRING或T_VARIABLE [英] Parse error: syntax error, unexpected '<', expecting T_STRING or T_VARIABLE
本文介绍了解析错误:语法错误,意外的“<”,预期为T_STRING或T_VARIABLE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在按照 net.tutsplus.com/tutorials/ 中给出的教程在PHP中创建Helloworld。以下是产生错误的控制器代码:
I am creating Helloworld in PHP by following the tutorials given in net.tutsplus.com/tutorials/. Following is the controller code which is creating the error:
<?php
class Helloworld extends Controller{
function index()
{
$this->load->model('helloworld_model');
$data['result'] = $this->helloworld_model-><span class="sql">getData</span>();
$data['page_title'] = "CI Hello World App!";
$this->load->view('helloworld_view',$data);
}
} ?>
有帮助吗?
推荐答案
您访问的页面上出现渲染错误。不应显示HTML标记。这是固定的行:
There was a rendering error on the page you visited. An HTML tag was being displayed when it shouldn't have been. Here is the fixed line:
$data['result'] = $this->helloworld_model->getData();
这篇关于解析错误:语法错误,意外的“<”,预期为T_STRING或T_VARIABLE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文