PHP is often used with Apache Web servers for Linux/unix platforms. When we install PHP in the Apache environment, you have three installation modes to choose from: Static module, dynamic module (DSO) and CGI.
I suggest you better install PHP as
Curl requires the PHP environment to support the line. You can run the Phpinfo () function to support, generally to the php.ini; Extension=php_curl.dll, remove. Restart IIS or Apache.
The code is as follows
Copy Code
/*
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
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
Due to the historical reasons for the Internet, Apin is responsible for the overall network IP planning as well as the North American region also has some of Africa's IP allocation governance, and accordingly, whois.apin.net is the IP whois root
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
file System-based page Counter example
? Php
$countfile = "Num.txt";Defines that the file written by the counter is count.txt under the current directory, and then we should test whether the file can be openedif ($fp = fopen ($countfile, "r+"))
IMAP connection server code.
Connect an IMAP server link with an IMAP port of 143.$mbox = Imap_open ("{Localhost:143}inbox", "user_id", "password");Connection POP3 Server link, POP3 port is 110.$mbox = Imap_open ("{Localhost/pop3:110}inbox",
In asp,.net, date addition minus is a fairly simple datediff function to calculate how long the difference between two dates is, and when I learn PHP I think so, but completely different from what I think, the following is a friend wrote Php date
/** explorer! function library* Date of preparation: 2008-06-29* Last update: 2008-07-18 2:08**/Class system{//System sectionfunction Usr_level ($name) {$SQL = new MySQL ();$SQL->query ("Select ' Level ' WHERE ' username ' = ' $name
Web Effects Add data to select dynamically and save to data by PHP;
Value one
?
if ($_post)
{
$value = $_post[' select '];
Echo $value;
Save Database Tutorial Operations
}
?>
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
Below is a standard ajax request code. Normally there will be no problems,... In specific circumstances, problems may occur. For example, when username = fdas & 321, or the & symbol appears in the parameter value, in order to find this problem, I
A few days ago, I helped my friend solve the MSSQL database connection problem after the website was migrated. Then I set up its code locally to test the environment and found an ASP problem and solved it, it also helped my friend solve the problem.
Symptom:1. The same code runs normally on some machines, but an error is reported when running on specific machines.2. Some pages of the same site are displayed normally (for example, ), However, when you open some pages, phpxx_errors.log or the
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