1. When array is a continuous array starting from 0, the result of Json_encode is a string enclosed by []
And when array is not starting from 0 or discontinuous arrays, the result of Json_encode is a string of key-value pattern enclosed by {}
Copy
PHP recently released the first stable version of 5.5, introduced a class-level constant, the name is ' class ', the constant is valid for all classes, returns the full name of the class.
Copy the Code code as follows:
namespace
Copy CodeThe code is as follows:
function Grabimage ($url, $filename = ") {
if ($url = = ") {
return false; Returns False if the $url is empty;
}
$ext _name = STRRCHR ($url, '. '); Get the name extension of a picture
if ($ext _name! = '. gif ' &&
This program has 4 counters.
Index.php is a common counter can see the total number of times and the number of people who come to this site, point several times, not waterproof.
Index1.php is also a waterproof counter can see the number of times and
Copy CodeThe code is as follows:
/**
* Convert string to array
*
* @param string $data strings
* @return Array format is returned, if data is empty, an empty array is returned
*/
function String2array ($data) {
if ($data = = ") return array
For example, I have a development of a yellow page source to go to the home of the script. Before we set a demo program address: Http://www.jb51.net and now this domain name needs to be used for other stations, do not kill the original demo address
The value of the register_globals can be set to: On or off, and we'll give you a piece of code to describe the differences individually.
Code:
Copy the Code code as follows:
When the next program receives the Register_globals=off, it should use
Copy CodeThe code is as follows:
function Gettagstyle () {
$minFontSize = 8; Minimum font size, which can be changed as needed
$maxFontSize = 18; Maximum font size, which can be changed as needed
Return ' font-size: '. ($minFontSize +lcg_value () * (
using Apache's rewrite technology
PHP project needs to use the URL redirection technology, the basic requirement is to redirect such as/user/heiyeluren to/user.php?uid=heiyeluren such as the URL, of course, you can also put/article/
The following function code "123456" is an encrypted key, you can arbitrarily change.
PHP encryption, JS decryption, seemingly meaningless, mainly key in JS will be seen.
But it may be used in some places.
PHP Cryptographic functions
Copy the Code
Copy the Code code as follows:
Is_bool (), Is_float (), Is_int (), is_string (), Is_object (), Is_array (), and Is_integer ().
Be careful when judging
Is_numeric () detects if a variable is a numeric or numeric string different from Is_integer ()
Copy CodeThe code is as follows:
SQL: $SQL = "Delete from ' doing ' where ID in (' 1,2,3,4 ')";
Data is separated by commas.
Form:
Copy CodeThe code is as follows:
Good $id_dele=$_post[' Id_dele ' will be an array, although PHP is a weak type,
Because of the need for work, I have written a function based on the example function given in the manual, the code is as follows:
Copy CodeThe code is as follows:
Converts all numeric values in a multidimensional array to a string ———— "supports
Copy CodeThe code is as follows:
Service Hotline400-691-6006
Home
About UsHTML DropDownDHTML DropDown MenuJavaScript DropDownDropDown MenuCSS DropDown
News CenterASP DropdownPulldown MenuAJAX
Before you know regular expressions, you need to master some of the basic knowledge of regular expressions commonly used, if you can remember the best remember, do not remember the need to use the time can be found on the line, on a number of
The first language to use is PHP, plugin imgareaselect (download address), not too many fancy styles, index.php code is as follows:
Copy CodeThe code is as follows:
Picture cropping, previewing
After uploading the
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