This is a simple, convenient, full-featured paging class, you can change the CSS style files according to their own needs to achieve the control of page color, the use of PHP paging class, you can save yourself a lot of time, just need to embed in
After you set the read-only property for the index.php file, the Trojan does not have permission to append ads to the end of the file.
Below we look at the specific code, set index.php Read only:
Copy the Code code as follows:
function
PHP Functions Rand and Mt_rand
Mt_rand () four times times faster than Rand ()
Many of the old libc random number generators have some uncertainties and unknown characteristics and are slow. The rand () function of PHP uses the libc random
1. Why does PHP need to operate asynchronously?
In general, the application of PHP is a Web page display and other time-consuming tasks, if the comparison takes time to operate such as resize pictures, Big Data import, Batch send EDM, SMS, etc.,
In a previous company internal management system (Inneroa), for the construction of the directory tree I use the dtree, to achieve the unlimited level of directory display and the right-click menu function (the context menu includes: New, modify,
1. Set Cookies
PHP uses the Setcookie function to set cookies. It is important to note that a cookie is a part of the HTTP protocol header that is used to pass information between the browser and the server, so the cookie function must be called
Set_include_path Setting the default include path
In the include or require file, first look in the default include path, and then in the same directory to find
Cases:
There is a file under D:/xampp/htdocs/test/include for cls.mysqli.php
There is a
Copy CodeThe code is as follows:
Class HtmlEncode {
Static $_converttohtmlentitiessrcencoding= ' UTF-8 ';
/**
* Convert non-ASCII strings to HTML entities
*
* @example Htmlencode::encode ("I Believe it"); Output: I believe it.
* @param string $s to
When a function is called, it is modified in the function by assigning the PHP array as an argument to the parameter, without affecting the array itself.
Note that the pass in this procedure is passed as a value, the array variable is not a
php5.4 before the Json_encode when the Chinese will be Unicode encoding, Chinese will be encoded, become unreadable, similar to the "\u***" format, but also to a certain extent, increase the amount of data transferred.
For example:
Copy CodeThe
Today, a little research on the multi-image upload function, the following code to organize out, to facilitate their own use and for everyone to communicate
1, upload.html page, that is, the first input type=file file:
Copy CodeThe code is as
In PHP, the quickest way to read a file is to use functions such as file, file_get_contents, and just a few lines of code to do what we need. But when the file being manipulated is a large file, these functions may be out of the way, the following
First, enter the source directory
CD php-5.2.13/ext/ftp
#运行phpize生成configure/usr/local/php/bin/phpize
#编译, designate Php-config, note the php-config here, not php.ini./configure--with-php-config=/usr/local/php/bin/php-config#上面可以添加--enable-ftp, or
A small line of change, in fact, different platforms have different implementations, why this, can be the world is diverse. Originally in the UNIX world to replace the line with/n instead, but windows in order to reflect his differences, the use
In general, after the paging file opens gzip compression, its volume can be reduced 60%~90%, for the text class site, can save a lot of bandwidth and user waiting time. However, both IIS and Apache only compress the HTML class static files by
The basic process for database manipulation is:
1. Connect to the database server
2. Select Database
3. Execute SQL statements
4. Processing result Sets
5. Printing operation Information
The correlation functions used are
Resource mysql_connect
Unknowingly found that PHP has been out of the 5.5 version, and I have been using PHP5.2, let me look like a mountain out of the young man, and land and backward. After I used to use closures in JavaScript, I suddenly became interested in PHP
Copy CodeThe code is as follows:
=============================== Time Date ===============================
Y returns the last two digits of the year, the Y-year four digits, the M-month number, and the M-month English. D Month Date number, D week a
Method One:The commands you need are as follows:
Copy CodeThe code is as follows:
Rewriteengine on
Rewritecond%{Http_referer}!^$
Rewritecond%{http_referer}!^http://(www.)? Simue.com/.*$ [NC]
Rewriterule. (GIF &line;jpg) $-[F]
If you think it's
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