Chinese-English character interception
/*** Intercept Chinese and English characters* Enter description here ...* @param unknown_type $str* @param unknown_type $start* @param unknown_type $length* @param unknown_type $charset* @param unknown_type
To achieve a simple weather forecast, the following figure:
/*
*weather.php
*code:
*/
Weather here is: City the temperature is Temperature Wind Direction: Direction Wind
1 introduces the
mb_convert_encoding ($str, $encoding 1, $encoding 2)
$str, to convert the encoded string
$encoding 1, the target encoding, such as UTF-8,GBK, The case can be
$encoding 2, the original encoding, such as UTF-8,GBK, case can be
In the previous article, if you use UI components to support drag-and-drop, cjuidroppable indicates that a zone can accept dragged UI components that encapsulate JUI droppable plug-ins.
We modify the previous example to add a droppable area that
Cjuidraggable enables drag-and-drop functionality for other UI components that contain it, encapsulating JUI draggable plug-ins.
To enable a UI component to be dragged and dropped, the following are the basic uses of cjuidraggable:
beginwidget ('
Cjuisliderinput displays a slider that also encapsulates the JUI slider plug-in, which can be used as a user input UI component in form.
The basic usage is as follows:
beginwidget (' cactiveform ');?>
errorsummary ($model);?>
widget (
Cjuiprogressbar displays a progress bar. It encapsulates the JUI ProgressBar plug-in. Cjuiprogressbar displays a progress bar. It encapsulates the JUI ProgressBar plug-in.
widget (' Zii.widgets.jui.CJuiProgressBar ', array (
' id ' => '
Cjuibutton Display button, Cjuibutton can be either a submit button or a normal button.
The basic use of buttons is as follows:
widget (' Zii.widgets.jui.CJuiButton ', Array (
' ButtonType ' => ' submit ',
' name ' => ') Btnsubmit ',
' value ' =>
To understand the previous article, the first to see this article ... The kind of groping ~ ~ I spent half a year to understand the role of the class and implementation. The main thing is that I don't have an article that I can understand (I haven't
1, Str_ireplace () function
Replaces the string in the original string that was specified to be replaced with the new string. The Str_ireplace () function is not case-sensitive when it is manipulated.
Syntax format:
Str_ireplace (STR2,STR1,STR)
1. Manually escaping and restoring strings
Echo ' select * from emp where name=\ ' john \ ';
?>
Output: SELECT * from emp where name= ' John '
2. Use functions to escape and restore strings
(1) addslashes () function: To add a backslash to a
Multiple-spoke statement syntax:
if (conditional expression) {
Statement
}else if (conditional expression) {
Statement
}
......
else{
Statement
}
Example: Write a program to determine the age, if
Cstarrating is mainly used for grading, showing a group of stars (5) for scoring.
The basic usage is as follows
beginwidget (' cactiveform ');?> Widget (' cstarrating ', Array (
' model ' => $model,
' attribute ' =
and layout in a similar yii Framework in Java Swing also allow nesting, which is done through Ccontentdecorator, but the code does not need to use ccontentdecorator directly, but to define layout use
$this->begincontent (' Path/to/view ');
...
First, the database mydb has three tables:1 Info Table2 Users Table3 sname TableFirst do a login Main page login_1.phpDOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd ">HTMLxmlns=
PHP Learning 1-PHP file processing,
Include and require in PHP
The Php include (or require) Statement obtains all the text, code, and tags in the specified file and copies them to the file using the include statement.
This means that you can create
[PHP series] PHP recommended standard PSR-3, logging interface, psr-3 Logging
The last section talked about PHP official code specifications, the following to bring you the PHP series of PHP recommended standard of the other two, PSR-3, PSR-4.
First
PHP + JavaScript allows you to upload images without refreshing, phpjavascript
Html file code
PHP file code
/*** File Upload Method*/Public function uploadfile (){// Upload a single file$ Upload = new \ Think \ Upload (); // instantiate the
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