The Stdclass class is an internal reserved class for PHP that initially has no member variables and no member methods, all magic methods are set to null and can be used to pass variable arguments, but there is no method that can be called. The
Copy CodeThe code is as follows:
PHP Implementation Simple Calculator
Single-channel Branch
if (Isset ($_get["sub"]))
{
$num 1=true;//Whether the number 1 is an empty tag
$num 2=true;//Whether the number 2 is an empty tag
$numa =true;/
Copy CodeThe code is as follows:
/* Loop structure
* One, while loop
* while (expression)
* {
* loop body;//Repeat until expression is false
* }
* Second, Do-while cycle
* Three, for loop
*
* There are two types of loops depending on the cycle
Copy CodeThe code is as follows:
Get CPU information from your computer
function Onlyu () {
$a = ";
$b = Array ();
if (function_exists (' exec ')) {
if (mailto:! @exec (/all ", $b)) {
return false;
}
}elseif (function_exists (' system '))
Make Web system development and maintenance more convenient, thereby effectively save manpower and material resources, by more and more enterprises of the green.
Template engine is an important method of the MVC pattern building process, the
Overloading: The same class, the function name, the return value or parameter type, the number of different is called overloading.
Overwrite: a function of the same name with the same return value type, called overwrite of the same parameter. Refers
Commonly used time functions:
1.time (); Gets the total number of seconds from 1970/1/1 00:00:00 to now
2.mktime (); Set time
3.date (); Detailed information about the time of acquisition
Representative String
Description
PHP array functions are numerous, the following is my study of the summary, take this to remember, easy to learn later ...
One, the array definition:The definition of an array is defined using the array () method, and an empty array can be defined:
Example one (post submission form):
Copy CodeThe code is as follows:
chunkify Form
Copy CodeThe code is as follows:
chunkify Word
$word =$_post[' word '];
$number =$_post[' number '];
$chunks =ceil (strlen
It's not always possible to manually escape each of these special characters, not to mention what you typically do with forms that are automatically submitted.
Therefore, you should use the Mysql_real_escape_string
The status of data encryption in our lives has become increasingly important, especially given the large amount of data that is being traded and transmitted over the network. For information that does not need to be restored to the original data we
Preface
Smarty is an excellent PHP template engine that separates the logic code from the user interface.
Learning and using smarty, which is not applied to its cache technology is a big loss, it can be the user finally see the HMTL file cached
The solution is as follows and the other frameworks are identical.
Source code (/system/libraries/upload.php 199 line)
$this->file_type = Preg_replace ("/^ (. +?);. *$/"," \\1 ", $_files[$field [' type ']);
Modified to read as follows:
Copy
1. Handling of arrays:
1.1 Creation and initialization of arrays:
The 1.arrary () function creates an array, by default the 0 element is the first element of the array,
Count () and sizeof () function to get the number of data elements
2. Creating
PHP Concise functions
Topic: Class-like bacteria PHP concise function
Summary: PHP simple and straightforward function syntax
Suitable for people: interested in the open source community, interested in PHP, have a little time to understand
Step One: Build the environment
1, first check your PHP extension directory if there is php_gettext.dll this file, if not, this will require you
Download one or copy it from somewhere else and put it in the PHP extensions directory.
2, open php.ini,
PHP supports 8 basic types of data.
Four types of scalar:
Boolean (Boolean)
integer (integer type)
float (floating-point, also called double)
String (String)
Two kinds of composite types:
Array (arrays)
Object
Copy CodeThe code is as follows:
echo "Current operating system Information". Php_os. "
";
Echo ' This file path and file name is: '. __file__. '
';
echo "Current PHP version information". Php_version. "
";
?>
Common PHP pre-defined
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