We sometimes need to record the operation of a user or an action event on the back end, and you can use the back-end language such as PHP to log the results of the operation to a journal file to facilitate testing and locating problems. In
1. Use header header to set cache control header Cache-control.
PHP code1.
The code is as follows
Copy Code
Header (' Cache-control:private, Must-revalidate '); Support page Bounce
2. Use the
The date () function makes it easy to get the data above
The code is as follows
Copy Code
$month = $_get[' m ']?$_get[' m ']:d ate (' n ');$year = $_get[' y ']?$_get[' y ']:d ate (' Y '); $start _week = Date (' W ',
An example is provided:In the Windows environment: Originally in the php4.3.0 of the program, in the 4.3.1 Why many errors, the general hint is: notice:undefined varialbe: variable name.
For example, code that resembles the following:
The code is as follows
Copy Code
Connecting to a database$conn = mysql_connect ("localhost", "phpdb", "phpdb");mysql_select_db ("Test", $conn);?>?Get the parameters of a Web page$id =$_post[' id ']; Determine if the user name
function Listfolders (){Set a path$dir = "./";
Set up an array of file pieces$aDir = Array ();
$oCurrentdir = Opendir ($dir); Open Directory
while ($sFile = Readdir ($oCurrentdir))//Read all subdirectories of the current directory{if ($sFile!= '.
WAP (Wireless Communication Protocol) is an open global standard protocol for communication between digital mobile phones, personal handheld devices (PDAs, etc.) and computers. With the continuous development of wireless communications, static WAP
Begin
Potrzebujesz Darmowego Hostingu, Dobrze trafiłeś.
Tutaj Dostaniesz Wszystkie usługi potrzebne do "Zaistnienia watt sieci".
Darmowy hosted the www-m ożeszw ybrać 3rd D owolnes trony Watt D Omenieu gu.pl. (twoja_nazwa.ugu.pl)
Darmowe MB
How to use1 Create a Web project, named Jqueryuploaddemo, download the latest version from the official web and add it to the project after decompression2 Add the Uploadhandler.ashx file to the project to process the upload of the file.3 Add the
PHP while loop next
The number of times specified in the block of code that is being executed, or if the specified condition is true.
-------------------------------------------------- ------------------------------
PHP's LoopsMany times, when
The PHP switch syntax is used to perform actions based on different conditions.
-------------------------------------------------- ------------------------------
PHP for switch statementsUsing the switch statement to select one of the many
There was a problem at work today because our project data is so small that we need to borrow data from web search, and they only provide us with an XML interface. Therefore, we need to transform the XML data into HTML to present to everyone.
Direct installation:
CentOS Installation:
The code is as follows
Copy Code
Rpm-qa |grep PHP-GD
If it does not exist then execute the following:
The code is as follows
Copy Code
Yum
We know in PHP, variables usually do not need to define the direct use, but sometimes because of the PHP environment problems will appear all kinds of strange things, today in the debugger directly prompts notice:undefined variable error, This is
If you call the json_encode () function that comes with PHP, when you encounter a Chinese character, the Chinese character will be escaped. For example:Echo json_encode (array (' '));// Output: ["\ u4f60 \ u597d"]This is very annoying, like a bunch
1. php curl ipv4 example The code is as follows:Copy code /*** Http Test* Note: Only the PHP version 5.2 or later supports CURL_IPRESOLVE_V4.* @ Param $ url: website domain name* @ Param $ type: Website Access Protocol* @ Param $ ipresolve
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