Small series on the internet to check a lot of PHP to generate a unique ID method of the article, found that there are many methods, special finishing this article with you to share PHP to generate a unique ID solution, I hope you like.
1, MD5
Simple QR code public Function QRCode () { Vendor (' Phpqrcode.phpqrcode '); Generate QR code image $object = new \qrcode (); $url = ' http://www.shouce.ren/';//URL or text content $level =3; $size =4;
Microtime functionDescription: Returns the current UNIX timestamp and number of microsecondsSyntax: Mixed microtime ([bool $get _as_float])Direct output echo microtime ();//Get the following: 0.26672100 1585622985 Front is the current microsecond
mime| Essence SENDMAIL.PHP4
?
Load the class that sent the attachment
Require (' html_mime_mail.inc ');
if ($update!= "") {//If with attachment
Upload attachment
if (!file_exists ("c:/ftptmp/". $myfile _name)) {
if (Copy ($myfile, "c:/ftptmp/".
This article mainly introduces how PHP can handle major random functions. For more information, see
Preface
The main thing PHP can do is to summarize the PHP syntax features and the classic usage of the relevant function libraries. it is not
Summary of encryption functions in php
This article introduces some functions related to encryption in php. if you need them, refer to it.The encryption function in php is similar to the following: 1, md5 () 2, sha1 () 3, crc32 () 4, crypt (
Yii integration Phpqrcode generate two-dimensional code with online demo address, Yiiphpqrcode
1, first to the official website download package http://phpqrcode.sourceforge.net/
After downloading the class library provided by the official website,
This article mainly introduces how PHP can handle major random functions. For more information, see
Preface
The main thing PHP can do is to summarize the PHP syntax features and the classic usage of the relevant function libraries. it is not
Tutorial | Application instance PHP write the program to send the Attachment (ii)
Class html_mime_mail{
var $headers;
var $body;
var $multipart;
var $mime;
var $html;
var $html _text;
var $html _images = Array ();
var $cids = array ();
var $do
Program
?Error_reporting (63);Include (' Class.html_mime_mail.inc ');/**************************************** * Example of usage.***************************************//**************************************** * Read the file background.gif into* *
The upload form does not need to be specially processed when using the upload function in ThinkPHP. For example, the following is a form submission with an attachment: formactionindex. phparticipant
The scenario for generating a unique ID is very common, such as temporary cache file names, temporary variables, temporary security codes, and so on, and the uniqid () function generates a unique ID based on the current time in microseconds. Because
The Usleep () function delays code execution for several microseconds. The unpack () function unpack the data from a binary string. The Uniqid () function generates a unique ID based on the current time in microseconds. The Time_sleep_until ()
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.