PHP file How to open, I put this to Baidu on the search, and then read in the most front of the article, I am very depressed to see that I am too difficult to ask myself, or he wrote I completely do not understand. I think the person who would ask
Nginx Ban Directory execution PHP method is much simpler, allowing the setting of multiple directories
Do not know if I do not understand the Apache, if there is a better way, I hope you point out sharing learning. Thx
Location ~*
Although the PHP language is powerful, it also requires programmers to write specifications to create code programs that are superior in performance. Let's share PHP performance optimization tips for everyone.
"Replace i=i+1 with I+=1." In line
There are two ways to get the output after $smarty->display and assign it as a string to a PHP variable:
1, Ob_start
Ob_start ();
$smarty->display ("Stocknews/getleft.tpl");
$string = Ob_get_contents ();
Ob_end_clean ();
2, $smarty->_smarty_vars['
The most common INI function for PHP configuration file php
PHP configuration function is a few ini_* functions, mainly for the operation of the configuration file, in fact, four functions: Ini_get, Ini_set, Ini_get_all, Ini_restore. The most
Performance improvements
The overall performance of PHP 5.3 has improved 5-15%
MD5 () fast.Better stack implementation in the engineConstants moved to Read-only memory.Exception process improvements (simplified, less opcodes)(require/include) _once
Mod_rewrite is a very powerful feature of Apache that can implement pseudo-static pages. Let me tell you more about how it's used.
1. Detect if Apache supports Mod_rewrite
Using PHP's Phpinfo () function to view the environment configuration,
Garbled has always been a very big problem for PHP beginners, and now summarizes the causes of garbled and solutions:
One, HTML page encoding: Meta Http-equiv=content-type content=text/html; Charset=utf-8 the code here and database encoding, and
Recent projects are not very large, so the time to compare the space, yesterday, thinking about writing something, think of a few days ago, the telecommunications company voted to choose a smile angel activities, vote is to fill in the verification
Today there is a webmaster consulting the fire a particularly simple question-how to use PHP to add records to MySQL? Now put a simple code to store data out, a little bit of analysis, the master will not see, very basic examples.
PHP writes data
First of all, we will introduce some basic functions of PHP to execute Linux system commands. I've been confused for a long time about the specific usage differences of the following functions.
System functions
Description: Executes external
Recently in the preparation of a book management program, you need to verify the correctness of the book ISBN, check some information, understand the composition of the Book ISBN code, detailed information can be consulted: ISBN-wikipedia, below or
In general, the speed of users to browse the Web page is a few seconds more than 10 seconds or even more time to refresh a page, but sometimes you will encounter a malicious rapid refresh of the Web page, resulting in a slow browsing speed of normal
1. Determine email:
The code is as follows
function Is_email ($email) {return strlen ($email) > 6 && preg_match ("/^[w-.") +@[w-]+ (. w+) +$/", $email);}?>
2. Determine the URL:
The code is as follows
function Is_url ($STR) {Return Preg_match ("/
Recently in making a day map is GIS integration • • To output HTML to JavaScript inside • • What's the trouble with code escaping? · So write a PHP function.
Share:
function Jsformat ($STR){$str = Trim ($STR);$str = Str_replace (' \\s\\s ', ' \\s '
With 2 programmers to fight, I feel that programmers may fight level is generally weak, because of lack of exercise, do not know what other programmers fight level?
Reply content:My combat effectiveness index is only five ... Wait a minute, 2
As one of the most widely used languages in web development, PHP has a large number of fans, so are you a good programmer? Do you want to face all kinds of problems while doing self-cultivation, how can I break through my own bottleneck so as to
@access
Scope of Use: Class,function,var,define,module
The tag is used to indicate access rights for the keyword: private, public, or proteced
@author
Specify the author
@copyright
Scope of Use: Class,function,var,define,module,use
Specify
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