(1) the use of ";?" and "?>" to contain the WML program line written by PHP, in the form:
?
...... (program line);
?>
(2) All other WML tags and statement lines are declared using the Echo keyword of PHP, followed by the newline character "n"
$parent is the parent of the children we want to
$level is increased when we go to the tree, deeper
Used to display a nice indented tree
function Display_children ($parent, $level) {
Gets all the child nodes $parent a parent node
$result =
1. Chinese garbled characters in mysql + phpThis problem occurs because the database connection and webpage encoding are inconsistent.SolutionWhen connecting to mysql, we will set a sentence later.Mysql_query ("set names gbk ");ExampleIn the
Example.Echo $ showtime = date ("Y-m-d H: I: s ");10:44:47The real time is18:44:47From the above point of view, the difference is 8 hours. Baidu search found that the default time set for PHP is based on Greenwich Mean Time Zone. We only need to
1. Locate undefined variables for processing The code is as follows:Copy code Addslashes (htmlspecialchars (isset ($ _ POST [$ str])? $ _ POST [$ str]: ''); 2. Filter out errors The code is as follows:Copy code @ $ Page = $ _ GET ["page"];
Php configuration: The code is as follows:Copy code Upload_max_filesize = 200 M Nginx configuration: The code is as follows:Copy code Client_max_body_size 200 m; According to the above statement, I am not sure whether it is the limitation
For example, date ("Y-m-d H: I: s", $ t );. However, in this case, the correct time cannot be called up. If this value is null, the error-01-01 will be displayed.The problem is that the country $ t is an incorrect time cut. We only need to use $ t =
Experiments show that the fread function can read a maximum of 8192 bytes at a time, that is, 8 kB. If you want to read a file larger than this size, you need to read it cyclically until the end of the file. Based on the above corrections, the
UTF-8 is used in mysql to indicate UTF-8, which is a type of encoding.In php, mysql_query ("set names UTF-8 & Prime;); because mysql defines utf8 instead of UTF-8, this statement cannot be executed, the effect is the same as that of mysql_query
I first removed the extension = php_curl.dll in php. ini and restarted the apache environment, but the following function is prompted when I call the following function: The code is as follows:Copy code // Initialize a cURL object$ Curl =
The description on the document page uses the substr function to intercept 220 characters, but the last Chinese character is always garbled and the length obtained is incorrect.The Magic Google method may be found because substr (string, start,
During a routine check log, we found that a large number of PHP connection Memcached timeout errors were found in the Nginx log, as shown below:PHP Warning: Memcache: connect (): Can't connect to 127.0.0.1: 11211, Connection timed out (110)
The htmlentities function may contain garbled characters when used in Chinese character variables. The code is as follows:Copy code $ ResultsText = str_replace ("[QUERY]", htmlentities ($ query), $ resultsText ); The correct method is to change
Baidu found outPHP generate UTF-8 encoded CSV file with Excel open Chinese display garbled, is because the output CSV file does not have BOM.We just need to take a look.So how to output BOM in PHP?Before all content is output The code is as follows:
Add another port instance to the web server [apache + php Tutorial]/*Find your apache installation directory and find the httpd. conf file,Search for # listen, and add The code is as follows:Copy code Listen 800.Listen 801.Listen 802. Here is
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