I have referenced some writing methods and ideas on the Internet.
Function sift_prime ($ max) {for ($ I = 2; $ I $ prime) {If (true = $ prime) // if the value is true, returns $ newdata ;}
1. Basic knowledge points
The meaning of several status codes in http: 503,500,401,200,301,302...
Include, require, include_once, and require_once.
History of several PHP/MySQL versions, such as major improvements from mysql4.0 to 4.1 and from
Class page {// The number of pages displayed on each page in the pagination bar public $ rollpage = 6; // The parameter public $ parameter to be included in the page Jump; // The default list shows the number of rows per page. Public $ listrows = 20;
Several MySQL statements commonly used in PHPDisplay database or table:Show databases; // you can then use database_name;Show tables;Change Table Name:Alter table table_name rename new_t;Add column:Alter table table_name add column C_n column
The sequence of constructors in PHP:
Class test {
Public Function _ initialize (){Echo '_ initialize ';
}
Public Function _ construct (){Echo '_ construct ';}
Public Function Test (){Echo 'test ';}
Public Function _ destruct (){Echo 'destoct ';}}
$
The pagination of search results in PHP cannot be the same as that of common data. The pagination link is invalid because the form data will not be lost when the pagination link is clicked.
There are several solutions.
The first is to use the
Some unresolvable strings in PHP of json_decode include the following common types.
I. Bug #42186 json_decode () won't work with \ L
When the string contains \ L, json_decode cannot be parsed. Test code:
echo "***********json_decode() won't work
Some PHP ide tools are introduced here. editplus and others are specially developed for PHP. If you are interested, you can try it and find out what you can use, I have used Zend studio as a development tool for the past year. Because debugging and
Friend's freeimage extension already provides PhP5 support. below is the DLL file download for PhP5Currently, only Apache is supported, and it passes the Apache test. IIS test fails.Source code: http://pecl.php.net/get/FreeImage-0.1.tgzPackage
Reprinted: http://forum.home.news.cn/thread/70850586/1.html
At present, there are still many people who do not understand the differences between the collaborative OA developed by PHP and Java, and what impact does it have on themselves, so that
When developing a website using the MVC method, I want to use the phplib template class to process all templates. I want to find a C # template source code on the Internet, finally, I found the source code of the VBScript version. On this basis, I
For example, to report an error to the user, use the following method:You can use set_error_handler to set your own error handling function. trigger_error is used in the error reporting area, and an error information page is displayed in the custom
Zz from: http://thinkblog.sinaapp.com /? P = 72
XSS, also known as CSS (Cross Site Script), is a Cross-Site scripting attack. A malicious attacker inserts malicious html code into a Web page. When a user browses this page, the html code embedded in
PHP has been written for a while. There are not many codes, but we have encountered some intractable diseases. This is the first article, which is saved for a long time and updated for a long time to feed the latter.
1. After PHP outputs anything,
MYSQL, the paging class is the most common class for writing PHP code.
Today, I watched the PHP100 video. The more I used it, the more I found that the two classes in the video are very powerful. Although I still feel that there are limitations, I
The test code is as follows:
/**************************@ Filename: pdotest. php@ Content: pDO for MySQL and access (test)**************************/If ($ _ Get ['db'] = 'mysql '){$ DNS = 'mysql: host = localhost; dbname = test ';$ Dbuser = 'root ';$
The first PHP virus found in the world
Date ??? Source: eNews
[ENews message] an anti-virus company named Central Command found that the first virus written in PHP Script language (a new CGI Network Programming Language) began
This is a php paging code found on the Internet. It is modified and ready for use at any time,
Paging functions:
$ page_len) {if ($ page + 4> $ page_total) {$ end = $ page_total; $ begin = $ page_total-8 ;} else if ($ page homepage '; $ pagenums.
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