This article describes, Use PHP to quickly split Chinese strings into an example of an array for everyone to learn. In PHP, splitting a string is simple, mainly using the function Preg_match_all. When processing a string containing Chinese, you can
This article introduces the method of dividing PHP into English strings, calculates the total length of the characters, intercepts the string from the left, and cuts the string into the array by the given text. Please refer to the friends who are in
This article introduces, using PHP to get the first letter of the method, the encoding format for gb2312, the need for a friend reference.PHP obtains the first letter in Chinese characters, code:
0XB0C4, ' B ' =>0xb2c0, ' C ' =>0xb4ed, ' d ' =
require_once ('.. /.. /lib/some_class.php ');
copy code This is a disadvantage: it first looks for the specified PHP include path, and then finds the current directory. Therefore, too many paths are checked. If the script is included in a
/**
* Filter Hazard parameters
* edit:bbs.it-home.org
*/
Code by Safe3
function Customerror ($errno, $errstr, $errfile, $errline)
{
echo "Error number: [$errno],error on line $errline in $errfile";
Die ();
127.0.0.1 www.a.com
127.0.0.1 www.b.com
Copy CodeFirst: Create the a_setcookie.php file:
Header (' p3p:cp= ' CURa ADMa DEVa Psao psdo our BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR "');
This article describes the method of hiding the version output x-powered-by of the PHP header under the reference of a friend who needs it.In the PHP program, the default output header information: (status-line) http/1.1 okdate Wed, 02:30:46
System (' dir ');
exec (' dir ');
PassThru (' dir ');
Echo ' dir ';
Copy CodePHP, like other programming languages, can invoke external commands entirely within a program, and is simple: just use one or several
This article shares a PHP file cache data class, written very good specification, followed by the invocation of the example. Refer to a friend who needs it.Speaking of PHP file cache, review the previous article, found a few: PHP cache class Call
This article introduces the implementation of PHP to view the page source code an example, for displaying or viewing the source code of the Web page, the need for a friend to refer to it.This section of the PHP code that we share is used to display
This article describes the relevant contents of the array pointers in the PHP array, as required by the friend reference.In PHP, functions involving array pointers are: RESET, prev, end, next, current, each.Example 1,next and prev
Echo prev ($
/**
* PHP code to get the PR value of the website
* by bbs.it-home.org
*/
$googlehost = "toolbarqueries.google.com";
$googleua = "mozilla/5.0 (Windows; U Windows NT 5.1; En-us; rv:1.8.0.6) gecko/20060728 firefox/1.5 ";
Open the directory under the current directory under Pic subdirectory common.
$handler = Opendir (' Pic/common ');
Copy Code2. Loop through all the files in the directory
/* Where $filename = Readdir
Please upload the attachment:
Copy CodeTip: You can set the maximum number of files allowed to be uploaded by Upload_max_filesize in php.ini.In addition, there is also a post_max_size can be used to set the maximum allowed to upload the
This article shares the following PHP use mysqli extension operation MySQL database of several examples, very good, have the need of friends can refer to, will certainly help.1, MYSQLI Expansion Library operation of MySQL DQL
Connect_error)
This article introduces the problem of writing data to NULL when using File_put_contents in PHP with high concurrency and exclusive locks, and the solution is to have a friend reference.When high concurrent access is used, writing to a file using
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