PHP Common Caching Method:The first type of data that needs to be cached is processed to form files that PHP can execute directly. When you need to cache the data, introduce it by using the Include method and use it.Second, the required data is
mysql_connect (' localhost ', ' root ', ' root ') or Die (' remote server cant ' connect ');mysql_select_db (' www.111cn.net ') or (' selected not exists! ');$sql = "Select Borough_thumb,id from Fke_borough where borough_thumb<> ' and isnew =
PHP Common caching way to get started tutorialThe first type of data that needs to be cached is processed to form files that PHP can execute directly. When you need to cache data
, introduced by the include method, and used.Second, the required
The list () function list() is actually a language structure, not a function . ... Tips and comments. Note: This function is used only for arrays of numeric indices
Let's look at a list instance.
List ($arr, $ar 2) =array (' AA ', ' 66 ');
List ($
1. Modify three items in the PHP configuration file: vim/usr/local/php/etc/php. ini(1) post_max_size = 50 M # maximum POST data acceptable to PHP(2) upload_max_filesize = 50 M # maximum value allowed for file Upload(3) max_execution_time = 300 #
Example. The code is as follows:Copy code /*** Convert non-GBK character set encoding to GBK ** @ Param mixed $ mixed source data ** @ Return mixed GBK format data*/Function charsetToGBK ($ mixed){If (is_array ($ mixed )){Foreach ($ mixed as $ k
For example, my http://www.111cn.net/xx. php file I don't want anyone to access directly from a browserBut if you connect to http://www.111cn.net/xx. php from any website, you can accessThe connection established on the local machine cannot be
We don't need to talk much about user login. It's easy to use the data sent from the form to be processed by the php Tutorial to determine whether the user name and password are the same as the one we set or the database tutorial.User
The code is as follows:Copy code Echo ' Delete ' You can also use the following method to delete an instance: The code is as follows:Copy code Here, you only need to modify the connection username and password of your database tutorial,
The code is as follows:Copy code Int preg_match (string pattern, string subject [, array matches [, int flags]) Search for the content that matches the regular expression given by pattern in the subject string.If matches is provided, it is
Replacing characters in the php Tutorial is the most efficient and simplest character replacement function str_replace ($ arr1, $ arr2, $ str)Instance 1 The code is as follows:Copy code Str_replace ("iwind", "kiki", "I love iwind, iwind said
Class show_page {/*** Page output result ** @ Var string*/Var $ output;/*** If this class is used, the default value is PHP_SELF. ** @ Var string*/Var $ file;/*** Page number transfer variable. The default value is 'P' ** @ Var
Php array_push added value function to the arrayPublic static function insert (& $ array, $ key, $ newValue, $ before = true ){$ Result = false;$ Size = sizeof ($ array );For ($ I = 0; $ I $ Value = array_shift ($ array );If ($ I ==$ key ){If ($
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