The array is the soul of PHP, very powerful, but sometimes object-oriented programming is also very convenient, the array and the switch between the object is often the case:
Example One
The code is as follows
Copy Code
The variable becomes a static variable as long as it is preceded by a keyword static.
function test (){static $NM =;$NM = $nm *;Print $nm. " ";}First time execution, $nm =Test ();First time execution, $nm =Test ();First time execution, $nm =Test ()
Introduced echarts Baidu Chart plug-ins and data china.js across the country
Next set the Echarts related properties and API interface
option = {Title: {Text: ' 2015 GDP statistics ',Subtext: ' Data source Network (unit: trillion yuan) ',Left: '
PHP Graphics Verification Code class
Copy code font file see attachment!
Session_Start ();
$vi = new Vcodeimage;
$vi->setimage (1,4,65,20,80,1);
Class vcodeimage{
/*******************************************************
Super simple PHP picture statistics, this kind of statistical device I used to do with TXT file, now directly with the database to achieve it. Let's look at the data structure first.
CREATE TABLE ' Count ' (' ID ' int (a) not NULL auto_increment,'
Public Function decodefilter (HTML, filter)
Html=lcase (HTML)
Filter=split (Filter, ",")
For all I in filter
Select case I
Case "Script" removes all client script javascipt,vbscript,jscript,js,vbs,event,...
html = Exere
*String Check Class* @author Sanshiqq:35047205Email:sanshi0815@tom.comMsn:sanshi0815@tom.com
*/Class Checkbase{function Checkbase (){}/*Used to check whether the string is empty* @param the fields $str check* @param $isStr If the field has the
The code is as follows
Copy Code
/*** @name Date Safe class 0.1* @author Kevin Xu* @copyright Kenvin e-mail:gincn@cn.cashboxparty.com msn:gincn@live.cn*/Interface datesafe{function GINCN ();}Class Safe extends Dosafe implements
1, prevent from jumping out of the web directoryFirst modify the httpd.conf, if you only allow your PHP script to operate in the Web directory, you can also modify the httpd.conf file limit php operation path. For example, your web directory
Include 'include. php Tutorial '; // reference the include. php file.Echo ();// Result bb?>The include. Php file is as follows:// Create include. php for calling other filesFunction a () // defines function{B (); // call function B in
All strings after this character cannot be saved. In any case, the "-" cannot be converted successfully or output. In addition, mb_convert_encoding does not have this bug.*/Header ("content-type: text/html; charset = utf-8 ");Echo
If the database uses UTF-8, what encoding is your text?Use mb_convert_encoding or iconv to convert the encoding. The two codes must be consistent to avoid garbled characters. There is also the database connection. If you add set names, all the
Key words in the text: Programming/PHP/skills[1] variables cannot be transferred between pages.The get, post, and session automatic global variables are disabled in the latest php version. Therefore, to obtain and submit the variables from the
1. File formatThe first problem to be encountered must be the file format. During web development, we all use html or xhtml. When we get to wap development, we have to use wml. What is wml? You can check more specific information, which I just
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