开发者

T_STRING error on line that just says <?php

开发者 https://www.devze.com 2022-12-13 14:41 出处:网络
So I\'m writing a script in codeigniter, and I get the following error message: Parse error: syntax error, unexpected T_STRING in /home/globalar/public_html/givinghusband.com/system/application/contr

So I'm writing a script in codeigniter, and I get the following error message:

Parse error: syntax error, unexpected T_STRING in /home/globalar/public_html/givinghusband.com/system/application/controllers/sizes.php on line 1

the only problem: the only thing on that line is this:

<?php

So I'm quite myster开发者_运维知识库ified as to what's going on here? Have I typed PHP wrong or what?


There could be a problem with your editor when it updated the file. I just had this problem and the editor removed all line breaks.

If you are uncertain try opening your php file in another editor or use the Cpanel file manager to take a peak.


Or you may have an unterminated quote or statement on some previous line without an ending semicolon (;) . Check all files that are included before this one.


a bare <?php in the file leads to a parse error in php (don't ask). Try adding a whitespace or a newline after it


Sorry.A bit late but might helpful for others.Just looked at your question.Just use

 <? 
 ?> 

instead of :

 <?php 
  ?> 

and remove whitespaces/line breaks between your php open tag and class name .It will resolve this conflict.Ta

0

精彩评论

暂无评论...
验证码 换一张
取 消