The code runs in win5.3.13 normal but syntax error,unexpected t_string appears in linux5.2.8.

Source: Internet
Author: User
Tags parse error php error
PHP Error

Look at the code first.
 
  
 
  
 
  
  
   
   
    
   
    
   
    
    
     
   
    
   
    
 
  

runs normal win5.3.13 on the local side. There are no errors.
But there was an error on the server side. (I don't know what the server-side settings are.) ) linux5.2.8
Parse error:syntax error, unexpected t_string in/home/xxxxxxxx/emailreturn.php on line 2
and then I tasted it on the server side. Try the code a bit.
!--? php header (' content-type:text/xml '); Echo ' 
    !--? php echo $code,?-->!--? php if (isset ($message)):?--> 
    
     !--? php echo $message;?--> 
    !--? php endif;?--  

The server is functioning normally. What is wrong with this, and why did you find this error?


Reply to discussion (solution)

your server-side PHP, with the short tag enabled
for the!--? XML is interpreted as
!--? PHP code starts
XML an invalid name

very simple, you have php.ini function in Short_open_tags,!--? XML let the PHP execution engine think is ph The label of the P statement.
short_open_tag

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.