During the development process, the information filled in when the page is returned due to a form error is often lost. to support page jump, you can use two methods. First, use the Header method to set the message Header
The attachment function of the forum was originally designed not for file management. due to server configuration, php, network, and other factors, uploading files through the forum is not a good solution. If you really need to improve the uploading
You can take a look at several php pen questions from night travelers.
I. basic questions
1. write the output results of the following program
The code is as follows:
$ Str1 = null;
$ Str2 = false;
Echo $ str1 = $ str2? 'Equality ': 'Unequal ';
$
This keyword can only be used to define classes and methods. The final keyword cannot be used to define member attributes. because final is a constant, we use define () to define constants in PHP () function, so you cannot use final to define member
Use php to convert any video format into the flv implementation code. for details, refer.
The code is as follows:
Define ("ROOT_DIR", dirname (_ FILE __));
Class EcodeFlv {
Var $ fromFile; // uploaded File
Var $ toFilePath; // Save the file
For more information about how to use PHP to replace Template variables, see.
1. open a file first. here PHP-> fopen (); function is used.
Definition and usage
The fopen () function opens a file or URL.
If opening fails, this function returns FALSE.
User-defined classes are also essential for learning PHP well. Compared with other object-oriented languages, PHP classes are quite simple. PHP only includes class, method, attributes, and extensions. If you are not familiar with using
If you want to use gb2312 encoding, php needs to output the header: header ("Content-Type: texthtml; charsetgb2312 PHP Chinese garbled characters are generally character sets. the encoding mainly involves the following issues.
I. first, PHP webpage
Some SERVER information is often used in PHP programming. the detailed parameters of $ _ SERVER are sorted out for future use. Some SERVER information is often used in PHP programming. the detailed parameters of $ _ SERVER are sorted out for future
Use single quotes instead of double quotes to include strings, which is faster. Because PHP will search for variables in strings enclosed by double quotes, but not in single quotes. Note: Only echo can do this, it is a "function" that can treat
I wrote a small item to record the indexing of the site by baidu and google. now I can query it. In fact, there is no difficulty. I just need to go to the file to get a remote file and analyze it. By the way, it seems that the query of googlepr is
PHP5.2.12 and 5.2.13 have been released recently to fix multiple bugs. Therefore, it is necessary to upgrade to this version. First, describe some of my parameters:
Operating system: Windows 7 Ultimate
Web Server: Apache 2.2.14
Visual Studio: 6.0
The echo () function outputs one or more strings. Here we will give you a simple arrangement and hope to help you.
The code is as follows:
Echo "asd"; // string
Echo "ads $ c"; // String + variable
Echo 'ads $ C'; // string asd $ c is not a
Generally, $ _ SERVER [is used to obtain the user IP address $ _ SERVER ['remote _ ADDR,
However, if a reverse proxy is used, REMOTE_ADDR in the HTTP header is not the user's address, but the address of the previous proxy.
After my research, there
HeadFirst design mode is a good book to explain the design mode. it is not as boring as F4. it should be easy to understand. Examples in the book are easy to understand, but because they are written by foreign experts, the habits of the examples are
Regular expressions are commonly used in PHP, which can be used by php friends. Regular expression
----------------------------------------------------------- Regular expression collection
Mobile phone number:
$ Mode = "/^ 1 [358] \ d {9
Zendframework supports multiple modules, but it is not easy to deploy because it is too powerful. Many people encounter such problems during use, and zend framework is now in version 1.11, and a lot of information on the network remains on the old
To learn how hackers intrude into the system, we recommend that you test the results first when writing php code. The focus of SQL injection is to construct SQL statements. Only SQL statements can be used flexibly.
Statement can be used to construct
Reference assignment: this means that the new variable simply references the original variable (in other words, "become its alias" or "point. Changing new variables will affect the original variables, and vice versa.
Value assignment: When a value
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