The encoding of all files in the PHP conversion folder is suitable for other encoding versions released on the website. for example, if you have a GBK version, you want to have a UTF8 version or you only have the GBK source code. you want to develop
The problem is not described in detail, but the production environment configuration is integrated into the development environment, so the error is invisible. After adjusting the log rules, it is OK. Yii's processing of error logs depends on PHP's
When the URL address is automatically generated using the U method in the template, the URL is generated for the address format of other project groups, such as the U method in the project group.
Use the U method in the template to automatically
Assume that the insert operation is performed on the Aritcle module of the default HOME group. in some examples, redirect redirection is performed on the project group.
Redirect
The general syntax of redirection is:
Redirect (url, params = array ()
ThinkPHP regular routing can implement more complex routing Definitions. the regular routing syntax is as follows: ThinkPHP regular routing
ThinkPHP
Regular routing can implement more complex routing Definitions. the regular routing syntax is as
[Switch] the processing method of php5.3 void function, such as ereg. * The void function is as follows:
Call_user_method () (replace with call_user_func () call_user_method_array () (replace) define_syslog_variables () dl () ereg () (replace with
Several regular expressions related to hyperlinks
1. delete the hyperlink in the content
ereg_replace(']*)>([^
ereg_replace("]*>|","",$content);
2. remove hyperlinks containing specific words
$ Find = "this string is my find ";
In kingcms, the default attribute does not contain the magic light attribute, so the first thing to do is to add the attribute, choose "Content Management"> "model management"> "field list"> "attribute"> "list" to add a field type: Yes/No; field
When setting fields in model management, you can select 'set as correlated Field'. if we specify the author field as author, all articles under an author are specified, the attribute is set to _ author = & quot; & quot;. Note that the user-defined
During the cache period, if the template file is modified, the program will re-read the template and generate the compilation file as the cache.
Process:
Set cache for the first time:$ Smarty-> caching = 1;$ Smarty-> cache_lifetime = 300; // Set
First, modify the protected/config/main under the generated framework. php enables your gii function. first, modify the protected/config/main under the framework you generated. php enables your gii function
'Modules' => array (
// Uncomment
This function returns an associated array that contains various components of an existing URL. If one of them is missing, an array item is not created for this component. Components:
The parse_url () function can parse the URL and return its
Quicksort is an improvement in bubble sorting. Proposed by C. A. R. Hoare in 1962. Its basic idea is: split the data to be sorted into two independent parts by one sort, and all the data in one part is smaller than all the data in the other part,
In the PHP array, a powerful language structure foreach is provided; with it, we can easily process arrays.
In the PHP array, a powerful language structure foreach is provided;With it, we can easily process arrays.Let's take a look at the PHP code.
There are three different systems that you want to use for synchronous login and registration.
Three different systems,I want to use them for synchronous login and registration.So what methods can be thought?Ucenter or sock post.UC is a product of
42 suggestions for optimizing PHP code 1. if a method can be static, make a static declaration on it. The speed can be increased to 4 times.
2. echo is faster than print.
3. use multiple echo parameters instead of periods to replace string
Detailed description of fragment caching in yiiframework
1. modify the main/config configuration file and add it to the cache component.
123
'Cache' => array ('class' => 'system. caching. cfilecache '),
2. define the filter in the
Configure and use the soap protocol in yiiframework
1. define Service ProviderYii relies on doc comments and class reflection to identify which method can be called remotely, including their parameters and return values.We define the server class
Yii implements MySQL multi-database and read/write splitting
Some time ago, I designed the architecture for the SNS product, conducted a lot of stress tests on the program framework, and finally selected YiiFramework. Why didn't I choose the company'
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