PHP documents do not end?> What are the benefits?

Source: Internet
Author: User
Php file does not end? & Gt; what are the benefits? 1. Why does the php file have no ending? & Gt; what are the benefits? 2. can I arbitrarily say that all my php files will not end in the future? (If not, which pages should end and which can not end ?) Php file does not end?> What are the benefits?

1. the php file does not end?> What are the benefits?

2. can I arbitrarily say that all my php files will not end in the future? (If not, which pages should end and which can not end ?) Share To: What are the benefits ?] 1. the php file does not end?> What are the benefits? 2. can I arbitrarily say that all my php files will not end in the future? (If not, which pages should end and which can not end ?) 'Data-pics = ''>
------ Solution --------------------
1. the php file does not end?> What are the benefits?
-- Prevent unnecessary blank lines or spaces from being output
2. if you are using php and html, what should you end with?> It is necessary. Otherwise, an error is reported.
------ Solution --------------------
If not Blank lines at the end of the file will not be output. if Yes?> If there are blank lines at the end of the file, it will be output. if the output is generated before the header, the program will report an error.
------ Solution --------------------
At the end of the php file used?> Can be omitted
Note: This is not an end, but a manifestation of php's humanization.
?> The last line ending character ";" can be omitted.

Omitting the last?> After the last line of code, and all spaces, empty lines are considered as part of the program, rather than being output
This prevents html code from being embedded with a large amount of white space.
It can also prevent problems caused by the output of spaces and empty rows to functions such as headers.

------ Solution --------------------
Of course there is no problem!
If this parameter is added, problems may occur.
------ Solution --------------------
Pure PHP, how do you get the view... is it echo 'test ';...........
Large-Scale Price Reduction
  • 59% Max. and 23% Avg.
  • Price Reduction for Core Products
  • Price Reduction in Multiple Regions
undefined. /
Connect with us on Discord
  • Secure, anonymous group chat without disturbance
  • Stay updated on campaigns, new products, and more
  • Support for all your questions
undefined. /
Free Tier
  • Start free from ECS to Big Data
  • Get Started in 3 Simple Steps
  • Try ECS t5 1C1G
undefined. /

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.