>  기사  >  백엔드 개발  >  Parse error: syntax error, unexpected T_CLASS,该怎么处理

Parse error: syntax error, unexpected T_CLASS,该怎么处理

WBOY
WBOY원래의
2016-06-13 12:04:477594검색

Parse error: syntax error, unexpected T_CLASS
最近学php,提示第三行有错误,帮忙看下是哪里错了?谢谢
“Parse error: syntax error, unexpected T_CLASS ” in test.php on line 3

<?php<br />require_once("razorflow_php\lib\core\StandaloneDashboard.php")<br />class SampleDashboard extends StandaloneDashboard {<br />    public function buildDashboard () {<br />        $table = new TableComponent('table1');<br />        $table->setCaption("Regional Sales");<br />        $table->setDimensions (4, 4);<br />        $table->setRowsPerPage (8);<br />        $table->addColumn('zone', "Zone");<br />        $table->addColumn('name', "Store Name");<br />        $table->addColumn('sale', "Sales Amount", array(<br />          "dataType" => "number",<br />          "numberPrefix" => "$ ",<br />          "textAlign" => "center"<br />        ));<br /><br />        $data = array(<br />          array("zone" => "North", "name" => "Northern Stores", "sale" => 4000),<br />          array("zone" => "South", "name" => "Southern Stores", "sale" => 4500)<br />        );<br /><br />        $table->addMultipleRows($data);<br /><br />        $this->addComponent ($table);<br />    }<br />}<br /><br />$db = new SampleDashboard();<br />$db->renderStandalone();

------解决方案--------------------
第二行 require_once("razorflow_php\lib\core\StandaloneDashboard.php") 后面少了行结束符 ;(分号)

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.