The _php technique of product numbering in PHP using Str_pad function to generate digital increment form

Workaround: $str = "QB". Str_pad (($maxid [0]["Max (ID)"]+1), 5, "0″,str_pad_left); where $maxid[0]["max (ID)"]+1) is a value that uses the Max function to find the largest ID from the database, with the ID as the primary key and not duplicated.

PHP Create desktop shortcuts for instance code _php tips

Copy Code code as follows: $shortCut = "[Internetshortcut] Url=http://www.jb51.net idlist= [{000214a0-0000-0000-c000-000000000046}] prop3=19,2 "; Header ("Content-type:application/octet-stream"); Header ("content-disposition:attachment;

PHP Verification code does not show only a small red fork solution _php Tips

Recently want to self-study PHP, made a verification code, but do not know how to do, there is always a small red fork, but the verification code is not shown, for the following reasons The following error occurred before it was modified; (1)

PHP cookies in a timely manner to introduce _php skills

In general, PHP in the browser to brush to appear cookies, how to make the cookie in time to take effect, the following to share a cookie in time to take effect of a method, very practical, The code is as follows: Copy Code code as follows:

Ways to add xdebug extensions to PHP _php tips

One, download the corresponding DLL Second, put the file in the PHP installation directory in the Ext folder Iii. Modification of PHP.ini Copy Code code as follows: [Xdebug] Zend_extension= "./ext/php_xdebug-2.2.3-5.3-vc9-nts.dll"

3 Ways to implement PHP multithreaded asynchronous requests _php tips

Read many versions of the PHP asynchronous request method, here a simple summary of several common methods to share 1. Implement one step request with Curl Curl extension is one of the most common methods we use in the development process, and

PHP Check e-mail function (self-write) _php tips

Copy Code code as follows: function Is_valid_email_address ($email) { $qtext = ' [^//x0d//x22//x5c//x80-//xff] '; $dtext = ' [^//x0d//x5b-//x5d//x80-//xff] '; $atom = ' [^//x00-//x20//x22//x28//x29//x2c//x2e//x3a-//x3c ']. '//x3e//x40//x5b-/

A PHP remote picture grab function to share _php tips

Copy Code code as follows: function Grabimage ($url, $filename = ' ") { if ($url = = ") { return false; Returns False if the $url is empty; } $ext _name = STRRCHR ($url, '. '); Get the name of the picture extension if ($ext _name!= '. gif '

PHP Curl Post _php problem solving skills

Submitting data to b.php in a.php, but b.php is unable to receive data, and CURL operation shows success, very strange. Originally, "Passing an array to Curlopt_postfields,curl will encode the data into multipart/form-data, while passing a

Introduction to PHP Basics _php Tips

The number of plastic implants in PHP is symbolic, can not represent unsigned integers, when the number of plastic is out of range, automatically converted from the number of php_int_size to float, you can use a constant to see the php integer type

Rewrite function to implement PHP two-dimensional/three-dimensional array _php technique

Because of the job needs, I have written a function based on the sample function given in the manual, the code is as follows: Copy Code code as follows: Converts all numeric values in a multidimensional array to a string ———— supports a

The reason why the picture does not appear in the PHP drawing and solves the _php skill

PHP drawing first to confirm that the GD library is enabled, to the php.ini file, find the Extension=php_gd2.dll will be before, remove, restart the server. If you do not see a normal picture in the drawing, the server is replying to the request,

How PHP uses Phpexcel to import databases _php tips

No more nonsense, just go to the code. Copy Code code as follows: Error_reporting (E_all); Open error Set_time_limit (0); Script does not timeout Date_default_timezone_set (' Europe/london '); Set time /** Include Path **/

PHP functions Call_user_func and Call_user_func_array usage _php tips

The Call_user_func function is used when you need to invoke a function dynamically, and this function has two uses:The first is to invoke the lonely function: Copy Code code as follows: function Funa ($b, $c) { Echo $b; Echo $c;

The little-known 10 functions in PHP _php tips

PHP has very rich built-in functions, many we have used, but there are still a lot of functions we are not familiar with, but they are very useful. In this article, I've listed some little-known PHP functions that will brighten your eyes.

PHP Session Exit Login Problem _php Skills

In PHP, if you use a session to determine whether a user is logged in or out, you can do so: Session_Start ();Session_destroy (); The session indicates that it has ended. Next sentence should write JS, so that the page jump. If it is a frames

In PHP or with | | The difference between and and && summary _php skills

There is no difference in itself, habit problems, but sometimes problems involving operator precedence, the results will be different, recorded.For example: Copy Code code as follows: $p = 6 or 0; Var_dump ($p);//int (6) $p = 6 | | 0;

PHP to determine whether remote pictures or files exist to implement code _php tips

The simplest way is to use fopen (), to see if the file can be opened, can play on the file of course there is Copy Code code as follows: $url = ' http://www.jb51.net/images/test.jpg '; if (@fopen ($url, ' R ')){Echo ' File

A summary of the usage of Ini_set and ini_get functions in PHP _php tips

PHP in the Ini_set function is used to modify the set of PHP php.ini configuration file function, with this function is very convenient, do not have to manually modify the php.ini file, sometimes we do not have the right to modify the php.ini file,

PHP pop-up balloon and jump to the new page that redirects to the new page _php tips

This two days to write a demo, need to use the prompt and jump, the main page requirements are not high, feel that there is no need to use AJAX,JS, and so on, so I studied how in the PHP prompts and jump. The first is to use the following:

Total Pages: 12780 1 .... 8734 8735 8736 8737 8738 .... 12780 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.