The function of PHP to remove duplicate values of an array can also be understood as removing duplicate values of an array.
/*** the difference between the array and the Array_unique function: it requires Val to be a string, and this can be an
Notification mechanism implementation, the official only documents do not have the demo code, for the people who did not have to spend a lot of time to do the test.
From the point of view of the document, each notification comes over the data, the
Php+ajax implementation of paging technology:
Based on the PHP and Ajax paging technology code, there are two PHP files, one is sn_inq.php, the other is sn_show.php, the previous PHP file called after a PHP file, the implementation of Ajax paging,
There is a project with the MongoDB database, query conditions have and also have or, press thinkphp official manual, using compound query (_complex), Getlastsql output query statement, found that the query condition is empty. Query with string
Often see someone ask findall the return data type is what kind of problem, and error do not know what reason, in fact, is still not familiar with the thinkphp built-in debugging means and methods, throw away the IDE itself with the debug mode does
Summary of variable operators commonly used by Smarty.
Capitalize [First letter capitalization]Count_characters [Count of characters]Cat [Connection string]Count_paragraphs [Count of paragraphs]Count_sentences [Count of sentences]Count_words [Count
When we use thinkphp development, we sometimes use GetByID (' 1 ') method to quickly get a message content, this method is more useful than using where ("ID =1")->find (), and query efficiency is faster than find.
Many people, when they first
I looked at the method of using Phpexcel to export data to an Excel file, but it seems more complicated. Icech found a class for CodeIgniter: Ci-excel-generation-library, the use of the method is very simple.
1. Download
So if the PHP script does not report grammatical error, what is the reason for it:
1. General integration Environment, the default is to turn on error reporting; But in a Linux system, it is not necessary to use packages to install
At this point,
echo "PHP gets the current URL
";
$url = "http://". $_server [' http_host '].$_server[' php_self '];
echo $url;
?>
The following code is: PHP Gets the Web site root directory
$PHP _self=$_server[' php_self '];$url = ' http://' $_server['
Was
php?name=php ">phpis not supported
functionHeavy-duty!
PHP, as a weakly typed language, cannot itself be overloaded like a strong type, such as Java, C + +, as a direct implementation. However, it is possible to implement overloading indirectly
the so-called object-oriented is when what what things do, we design the class when we need to think about how to do the content, then what kind of a class can be considered as the idea of OOP, the answer is: This class after writing, in the process
PHP Symmetric encryption algorithm
KEY is a previously defined constantCopy the Code code as follows:Mcrypt::encrypt ();Mcrypt::d ecrypt ();
Copy the Code code as follows:Defined (' ROOT ') or exit (' Access Denied ');
Class mcrypt{public static
Mod_rewrite is a very powerful feature of Apache that can implement pseudo-static pages. Let me tell you more about how to use it! Very useful for beginners Oh!
1. Detect if Apache supports Mod_rewrite
Using PHP's Phpinfo () function to view the
If garbled when exporting Chinese, you can try to convert the string to gb2312, for example$yourStr from UTF-8 converted into a gb2312:$yourStr= Mb_convert_encoding ("gb2312", "UTF-8",$yourStr); Summary PHP Export Excel PHP import Excel phpexcel
PHP winning probability algorithm, can be used for scraping cards, large turntable and other lottery algorithm. The usage is very simple, the code has the detailed comment explanation, can understand at a glance
$proCur) {
$randNum = Mt_rand (1,
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