Why can't PHP code directly save HTML files ?? & Gt; PHP static page generation tutorial
1. the server will parse the file based on its suffix. if it is an HTML file, the server will not parse the syntax, but directly output it to the browser. 2. if
PHP HTML markup To remove the original function of the explanation, PHP tag function in detail
Strip_tags removes HTML and PHP markup. Syntax: string strip_tags (String str); Return value: String function type: Data processing content Description
Remove unnecessary HTML tags from php
Echo strip_tags ($ str );
2. retain onlyFor a tag, you only needThe string is written to the second parameter of strip_tags.
Echo strip_tags ($ str ,"");
3.
PHP implementation of closed HTML tags, PHP complement HTML tags
The example in this article describes the HTML tags that PHP implements to close. Share to everyone for your reference, as follows:
Most of the time, when we make a fuss about
PHP, a nested abbreviated name, is an abbreviation for the English Super Text preprocessing language (Php:hypertext preprocessor). PHP is an HTML embedded language, PHP and Microsoft's ASP quite a bit similar, is a server-side implementation of
Several PHP server architectures are strongly recommended !!! I found a good article and introduced in detail several architectures of the current PHP Server. I specially reprinted it. I strongly recommend it !!? Nginx + PHP + PHP-FPM (FastCGI) on
Method 1:Directly remove the mark you want to remove
Copy CodeThe code is as follows:
Remove BR Mark
function strip ($STR)
{
$str =str_replace ("
"," ", $str);
$str =htmlspecialchars ($STR);
Return Strip_tags ($STR);
}
?>
Method 2.PHP has a
causes of compressed HTML
How to improve the page loading speed, how to optimize the HTML page to believe that each proposed to improve the station technology webmaster had thought of the problem, in fact, the method of Web optimization is still a
causes of compressed HTML
How to improve the speed of Web page loading, how to optimize the HTML page is believed to be each to improve the construction station technology webmaster had thought of the problem, in fact, the Web page optimization
How to improve the loading speed of web pages requires the optimization of web pages, and so on, are the concerns of webmasters. In fact, there are many ways to compress web pages, this article will explain how php compresses HTML functions to
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.