Use header (location: test. php) to perform the jump, pay attention to the following points, which helps solve some problems that beginners often encounter: 1. there must be no space between location and:; otherwise, an error will occur.
2. there
How to configure the apachephp environment in linux. Apache
1. install Apache
Copy httpd-2.2.4.tar.gz to the/usr/local/src directory.
Tar-zxvf httpd-2.2.4.tar.gz
Cd httpd-2.2.4
. /Configure -- prefix =/usr/local/apache2 -- enable-so --
Phpsession processing function file, you can carefully look at the user-define-session-inc.php file code:
The code is as follows:
Function mysession_open ($ save_path, $ session_name)
{
@ Mysql_connect ("localhost", "root", "1981427") // you must
In the past two days, I encountered a problem when debugging bugs, that is, the page jumps to the login page Cookie inexplicably.
Because there is no problem in the local test, ssh to the remote Server (instead of the publishing Server, we recommend
PHP Cookie-enabled login verification effect Cookie
The code is as follows:
Login
The code is as follows:
@ Mysql_connect ("localhost", "root", "1981427") // you must connect to the database server before selecting a
Strength analysis phpsession login verification
The code is as follows:
Login
The code is as follows:
@ Mysql_connect ("localhost", "root", "1981427") // you must connect to the database server before selecting a database.
Or
Let's take a look at the source code of excellent online programs, analyze the advantages and disadvantages, and quickly improve our level. The following is an excerpt:
If we design the topic table and reply table, the common practice is as follows.
Sometimes we need to know some situations in the mysql database. Fortunately, php provides some built-in methods and functions.
The code is as follows:
@ Mysql_connect ("localhost", "root", "1981427") // you must connect to the database server
The following describes how to delete records in php.
The code is as follows:
@ Mysql_connect ("localhost", "root", "1981427") // you must connect to the database server before selecting a database.
Or die ("database server connection failed ")
Php obtains the form data code, which is described in detail later. The latest php will help you learn more.
The code is as follows:
Form
The code is as follows:
// This program is used to receive form data from HTML pages
Php gets the first letter of Chinese characters and pinyin. you can test it on your own. Php obtains the first letter of Chinese Pinyin
The code is as follows:
Function getinitial ($ str)
{
$ Asc = ord (substr ($ str, 0, 1 ));
If ($ asc {
If ($
When using the file_get_contents function, timeout often occurs. here, you need to check the error message to see which error occurs. the more common is read timeout, in this case, you can try to avoid or solve the problem. Here we will briefly
Mssql outputs data in the system time format by default. you can adjust the system time format to solve the problem. of course, the solution is flexible in the program, for example:
"Select convert (char, date field, 120) as date2 from
PHP is very inefficient in array processing, especially memory usage, which often causes the httpd process to consume too much resources. Although a large number of array operations in PHP usually reflect some problems in programming, it is
PDO is a "database access abstraction layer" that unifies Access interfaces of various databases. compared with mysql and mysqli function libraries, PDO makes cross-database use more friendly. compared with ADODB and MDB2, PDO is more efficient. At
It is important to implement a set of commercial procedures. for example, if only a client can be used for one server, authorization verification is very important. The following is my idea: apply the php environment configuration of the server to
Use PHP to filter the code that may be used in html to introduce external dangerous content. Sometimes, users must submit html content to enrich the information published by users. of course, some codes that may cause messy page layout are also
Today, due to temporary needs, we need to dynamically add the transparency gradient effect to the image. I found an algorithm that does not have the corresponding function for a long time on the internet ....
The code is as follows:
/// $
PHP is a server-side scripting language that is easy to learn and use. With little programming knowledge, you can use PHP to build a truly interactive WEB site. This tutorial does not want you to fully understand this language, but allows you to
Because I recently want to create something similar to a professional search engine, I need to capture all the hyperlinks on the web page. Let's test whether the following code can target all the standard hyperlinks. Test the regular expression
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