Class child{
P Ublic $name;
//define and initialize a static variable $nums reference link: PHP static variable initialization
public static $nums =0;
function __construct ($name) {
$this->name= $name;
/**
* * Generic PHP paging class. (Imitation Google style)
* * Simply provide two parameters for the total number of records and the number of displays per page. (Detailed usage instructions are attached.)
* * No URL is specified and
Or a side dish, the first time to share code ah, this is their own previous write a PHP collection class, I have been in use, self-feeling is very simple and powerful, as long as a little bit of knowledge of the selector can be collected any page,
if (Strpos ($_server["Http_user_agent"], "MSIE 8.0"))
echo "Internet Explorer 8.0"; You can write other execution commands here.
else if (Strpos ($_server["Http_user_agent"], "MSIE 7.0"))
echo "Internet Explorer 7.0";
I recently saw a lot of posts in hacker News that suggested that you shouldn't work too hard, or that you should work less than 35 hours a week. (Don't misunderstand my meaning.) What I want to say is that the authors of these articles are already
Online editingJS Plugin to use:QrcodesvgDraw two-dimensional code plug-in colorpicker based on informationFor color selection, JS binding event Change the color of the QR Code (SVG) CANVGUsed to convert the SVG format QR code into a HTML5 canvas,
var $file;
var $index;
Create a file and write the input
function Null_write ($new) {
$f =fopen ($this->file, "w");
Flock ($f, LOCK_EX);
Fputs ($f, $new);
Fclose ($f);
}
Add data record to end of file
As long as you name the file upload tag in the form as an array, you can upload multiple files simultaneously. Let's look at an example:---------------------------------------------------------------------
function
The source code of the cryptographic decryption string function in PHP:
/**
* Function: Encrypt string processing
* Parameter one: Content that needs to be encrypted
* Parameter two: key
*/
function
1. The advantages and disadvantages of Apache server and Nginx:We used to use Apache extensively as a httpserver.Apache has excellent performance, and can provide a variety of features through the module.1) First Apache response to the client is to
if (true)
{
Header (' location:http://bbs.it-home.org ');
}
File_put_contents (' test.txt ', ' OK ');//This line, generate a Test.txt file, the contents of the file is OK
Copy CodeIn this code, the careless programmer
Personal Understanding:The so-called elegant programming is to drink coffee, touch the keyboard, thinking about business;The elegant code is defined as:1, as far as possible less single double quotation marks;2, do not nest;3, the name is all the
PHP Socket basic principle, the basic use method:Server: Create a socket socket = "bind this socket to the specified IP and port =" Listen for all link requests for this socket = "Response or return dataClient: Create a socket socket = "Connection
Recently in the process of learning PHP found PHP format timestamp 8 hours later than Beijing time, internet search found that the original time zone is not correct, the solution is:1. Permanent modificationChange Data.timezone in php.ini file = PRC
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