Sharing a PHP cookie operation class, using the PHP namespace, this is relatively new, the need for friends to refer to it.A PHP cookie action class that implements basic operational functions: Creating a cookie, setting the expiration time of a
In this paper, we introduce a custom function Array_different for array difference set, which is better than Array_diff function. Refer to a friend who needs it.PHP to find the array difference set, the code is as follows: $v AL) {if (Isset ($array _
/**
* Get EXIF information for pictures
* edit:bbs.it-home.org
*/
echo "Test1.jpg:\ n ";
$exif = Exif_read_data (' tests/test1.jpg ', ' IFD0 ');
Echo $exif ===false? "No header data found.\ n ":" Image
if (!empty ($_files["img" ["name"])) {//Extract the File field content name and determine
$path = "uppic/"; Upload path
if (!file_exists ($path))
{
Check if there is a folder, if not created, and give the highest permissions
Share a few PHP code to get the current CPU usage in the system, a friend of the need to make a reference to it.In PHP, you can use Getrusage () to get CPU usage, which applies only to Linux systems. Example:
0 [Ru_inblock] + 0 [ru_msgsnd] = 2
Sharing the next PHP call user-defined functions, there are simple and complex, suitable for beginners to the PHP custom Function Reference.The Call_user_func function, the Call_user_func_array function, and the CALL_USER_FUNC function are often
This article describes the following, a class for sending email messages, you can use the SMTP and mail functions two ways to send mail, the need for a friend reference.PHP implementation of the mail-sending class, two ways: SMTP mode and mail
This article introduces, with PHP to get the full URL of the current page of a piece of code, very simple, very practical, there is a need for a friend reference.In PHP, all the information is contained in the hyper-global variable $_server. With
This article describes the following, in PHP programming, the way to close a file that has been opened, as required by a friend reference.In PHP, when you open a file for related operations, you need to close the file handle in a timely manner to
Share a piece of PHP code, you can write text to the image of the function, the need for friends to refer to it.Sometimes, we need to put some text on the picture, that is, the so-called text watermark. This section of the code that we share, with
This article introduces a few examples of how to get the text between tags in PHP, with the reference of a friend in need.The following example provides a way to retrieve text between labels.Note: Do not use regular expressions to parse the HTML.By
This article introduces a section of PHP code for uploading PDF files to the site space, with the reference of a friend in need.Upload files in PDF format using PHP.1,html part2, upload the PDF file code, need to do file format detection, here is:
For everyone to share a PHP cloud tag code, now this is very popular oh, have the need for friends to refer to it.In today's PHP Web site, the large number of cloud label applications, make the page appear to be effective and interesting, but also
This article shares a PHP code to count the number of file lines, Instead of using the file () function, you can use the Fopen series function to implement this function through a custom function. We hope to help you. In PHP, using the file ()
This article introduces a few examples of the Eval function in PHP, with the need for a friend to refer to it.In PHP, the eval function is used to substitute values into strings.Syntax: void eval (string code_str); Return value: No function type:
Share a PHP image upload class, and can automatically generate thumbnails, the need for friends, can make a reference, hope can be useful to you.PHP implementation of the picture file upload class, code:
SaveFile (); # Save the method and
/***
* pinyin.php
* Example:pinyin (' Zhang Honghua ', 1); The second parameter is arbitrarily set to UTF-8 encoding to NULL the default is GB encoding
* edit:bbs.it-home.org
**/
function Pinyin ($_string, $_code= ' gb2
/**
* PHP String Function Example
* by bbs.it-home.org
*/
$str 1= "ABCD";
Print ($str 1);//output function, with return result (string), Speed no echo fast!
It can be said that ECHO is not a PHP function
Print_r
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