After the YII framework is installed, the frame step is automatically generated:
First, Yiiroot/framework/yiic WebApp webroot/test, so that under the test directory, we will have a project.
Second, configure the database, open the config/main.php
Turn from: http://www.jb51.net/article/29306.htm
PHP for case sensitive problem processing is messy, write code may occasionally problem, so here is summed up. But I am not encouraging everyone to use these rules. We recommend that you always adhere
Because the line-wrapping in the textarea is "\ n" or "\ r \ n" (Linux is entered as ' \ r \ n ', Windows is ' \ n ') the newline in normal HTML is or ;
Situation one, if the content of the textarea directly into the database, the newline in the
Run mode
About PHP currently more common five major operating modes:
1 CGI (Universal Gateway Interface/Common gateways Interface)
2) FastCGI (resident type cgi/long-live CGI)
3 CLI (command-line run/command line Interface)
4 Web Module mode (Apache
PHP parseURL a useful function
parse_url-resolves the URL and returns its constituent parts. Description Array parse_url (string $url)
This function resolves a URL and returns an associative array containing the various components that appear in
1. Create an array
In programming languages, values and strings are called scalar variables, and a scalar variable can only represent a single numeric value or string. For example, $YDTX = the variable $ydtx in "mobile communication" is a scalar
First, Chinese interception: Mb_substr ()
Mb_substr ($str, $start, $length, $encoding)
$str, a string that needs to be truncated
$start, starting at 0 at the beginning of the truncation
$length, the number of words to intercept
$encoding, page
The first step: Download the website demo
Step Two: Introduce the demo code into the program
function Getappcode ($order, $config _value) {require_once (' aop/aopclient.php ');
Require_once (' aop/request/alipaytradeapppayrequest.php ');
$AOP =
A reference is a wonderful thing, a bit like a pointer in C, but it's not the same. In PHP, references are justA different name for the variable content. Let me make a few examples to illustrate (just PHP4 content, PHP5There has been a great change
In the front I have studied the mod_php mode in PHP and the mode_fastcgi and PHP-FPM mode: address, which roughly tells the difference between several modes, and also understands that PHP-FPM is the manager of fastcgi mode. Let's take a look at how
Chinese characters converted into phonetic function, write to URL can do search engine optimizationTranslate Chinese characters into pinyin and write to URLs to do Google optimizationCall Function name: Pinyin ($STR)Chinese character conversion
There are two methods in PHP that can be used to parse URLs, respectively, Parse_url and Parse_str.
Parse_urlResolves the URL and returns its components
Mixed Parse_url (string $url [, int $component =-1])
This function resolves a URL and returns
CentOS after the mysql+apache+php, found that some of the pages open is blank.Will php.ini inside the parameters
error_reporting = E_all,display_errors = On,display_startup_errors = On
After setting, the error reason Fatal error:call to undefined
Above we correctly connect to the MySQL database, this article will further create a database, table, fill in the table data.
You know, connect to the database to do the operation, the same code moved over
connect_error) {
die ("Connection failed:"
turn from: http://kuxoo.com/phpMyAdmin/
[phpMyAdmin to take Shell backstage]
CREATE TABLE ' mysql '. ' Xiaoma ' (' xiaoma1 ' TEXT not NULL);
INSERT into ' MySQL '. ' Xiaoma ' (' xiaoma1 ') VALUES (' ');
Select Xiaoma1 from Xiaoma into outfile ' e:/
October 30, 2009, Friday 12:01
As a popular Web programming language, PHP 's biggest advantage is speed. PHP4 has done very well in this area and you can hardly find a faster scripting language. But if your application load is very large,
2-1-1php Environment Build installation Server I win the workplace
One, Web server: Apache
Configure server: C:\Apache2.2\conf\httpd.conf
Apache Home directory: DocumentRoot node
Directory:apache's Browse directory and home directory remain
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