Php closed tag output extra null exercise xml page display error handling

Source: Internet
Author: User
Php closed tag output extra blank exercise xml page display error handling in the official PHP documentation, once pointed out that it is best not to end with?> End tag. But our programming habits and the IDE will be for me
Are you automatically creating the php end mark?>. This flag normally does not affect the running of the program. Especially in early versions of php4
Improper marking does not affect the final output. However, I recently encountered a problem where the php script end mark cannot be displayed as a page.
First, the xml file is output by wap. if the xml file format is incorrect, the result cannot be displayed. No
The same code is displayed on another test machine. View the final output through firebug

PHP closed tag "?>" PHP analyzer is optional in PHP. However, if you use closed tags, any developer, user, or the spaces after inserting the closed tag in the FTP application may cause redundant output, php errors, and subsequent output that cannot be displayed, and empty white pages. Therefore, all php files should omit this php closed tag and insert a comment to indicate that this is the bottom of the file and locate the relative path of the file in this application. This helps you determine that the file has been ended rather than deleted.

// INCORRECT writing method: INCORRECT
 // The CORRECT format is CORRECT:
 

Demo:

Test. php
  
  
   
    <! [CDATA [test]>
    http://baidu.com
    测试空行输出
    
    zh-CN
    
    18.11.2016 14:54:02
    
    18.11.2016 14:54:02
    
   
  '; // Exit;

System File sys_common.php to be introduced

  

OK. find the import file and remove the closed 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.