PHP provides functions that can easily convert various forms of a date to a timestamp, which is mainly:
Strtotime (): Resolves the datetime description of any English text to a timestamp.
Mktime (): Gets the timestamp from the date.
The principle is very simple, because GB2312/GBK is Chinese two bytes, these two bytes is the range of values, and utf-8 in the Chinese characters are three bytes, also each byte has a value range. The English language is less than 128 and takes
Ashamed to say, before the null value of the array is either strong write foreach or while, using these two syntax structure to delete empty elements in the array, the simple code is as follows:
Copy CodeThe code is as follows:
foreach ($arr as $k
The read of the CSV large file has been described earlier (PHP reads the code instance of the larger CSV file by line), but there are still some problems with how to quickly and fully manipulate large files.
1, how to quickly get the total number
jquery Uploadify is an AJAX-style batch image upload plugin, in PHP using jquery uploadify is very convenient, please follow the methods and procedures described in this article, for your PHP program to add the jquery uploadify plugin batch upload
PHP has undergone a dramatic change last year. Everyone seems to have an idea of what a good frame should look like, but then again, there are not many areas of product type that the framework or framework ultimately actually uses in different
A reference to PHP is to precede variables or functions, objects, etc. with & symbols. The reference in PHP means: Different names access the same variable content. There is a difference between pointers in C and C, where the contents of a variable
What is a session?
The Chinese translation of the session is called "conversation", its original meaning refers to the beginning and end of a series of actions/messages, such as phone calls from the pick up the telephone to hang up the phone in the
Although PHP has a ready to intercept string function substr (), but this function can not intercept the character string, to achieve this effect also requires us to write the corresponding function. Chinese characters have a variety of coding, such
The. htaccess file provides a way to change the configuration for each directory.
How it works and how to use it
The. htaccess file (or "Distributed Profile") provides a way to change the configuration for each directory by placing a file
PHP can also detect access to Windows memory information, and the code is quite simple, no intention to find, think later can be used, here to share with you.
This code will get the total memory, initial use and other memory information:
01
02echo "
Today encountered a problem, run the following code times wrong.
The error message is:
Warning:session_start () [Function.session-start]: Cannot send session cache Limiter-headers already sent (output Starte D at
Simply write a PHP image upload, can support JPG, PNG, GIF and other formats of the picture, if you want to support more formats, such as BMP, you can expand their own. It is not object-oriented, and is simply recorded here for later access.
This
CodeIgniter file Upload class allows files to be uploaded. You can set a file that specifies to upload a file of a certain type and a specified size.
Common process for uploading files:
A form for uploading files that allows the user to
Since it is necessary to determine if the uploaded file has been modified, the MD5 value of the uploaded file needs to be recorded, and the method of obtaining the MD5 value of the file is recorded here.
if (Isset ($_files[' Multimedia ')) &&
In PHP China to see a PHP code ridicule of the year-end summary, it is quite interesting to write, here also turn around. The programmer is to be funny, the mind is flexible, write this code of the buddy must be a very interesting person.
'
Many times we need to calculate the execution time of the PHP script to learn about the efficiency of the script, and so on. For example, there is a large section of PHP script, we need a fragment to get the script execution time method. First
Practice out the truth, write a simple file PHP file include a JS file, after executing no error or warning message, while seeing the content of the file containing JS is printed out. Therefore, it concludes that the include target file can be any
Generic paging Class (tested with CodeIgniter)
page_list.phpCopy the Code code as follows:
/*** Pagination Class*/Class Page_list {
/*** Total Data* @var int*/Private $total;/*** Show data per page* @var int*/Private $size;/*** Current Page* @
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