#一, PHP variable definition: Variables are used to store values, such as numbers, text strings or arrays, V: string/integer/double/array/object
Naming rules:
1. The variable name of PHP is case-sensitive. 2. The variable name must begin with $3,
In php, we have many methods to determine whether variables are null. php provides functions such as empty, isset, varnull, and is_null for variable judgment, next I will share with you how to use these methods. empty (... in php, we have many
PHP beginners learn variables and constants. In a change process, the constant volume is called a constant, while the variable is a sequential storage space with a name. The following describes the constant amount of the base of PHP variables and
PHP Functions: Empty () and isset () are the functions that determine whether a variable has been configured, but there are certain differences when used.
The empty () function is used to test whether a variable has been configured. Returns a value
Php pre-defined variable help (with instance ). From php4.1.0, the preferred method for getting external variables is to use the Superglobal variables mentioned below. Prior to this, people were either dependent on register_globals, or long
The preferred method for php to obtain external variables is to use the hyperglobal variables mentioned below. Prior to this, people were either dependent on register_globals or long pre-defined PHP array ($ HTTP _ * _ VARS ). From PHP5.0.0, PHP
A simple comparison between empty () and isset. The code is as follows:Copy code $ Var = 0; // The result is true because $ var is empty.// The result is true because $ var = 0If (empty ($ var) {echo '$ var is either 0 or not set at all ';}//
PHP Tutorial Configuration Chinese Narration
Let's see what you see, php.ini.
[PHP]
;;;;;;;;;;;; WARNING;;;;;;;;;;;;; This is the default settings file for new PHP installations.; By default, PHP installs itself with a configuration suitable for;
The preferred method for php to obtain external variables is to use the hyperglobal variables mentioned below. Prior to this, people were either dependent on register_globals or long pre-defined PHP array ($ HTTP _ * _ VARS ). Starting from PHP5.0.0
Now the development of the site to use the Smarty framework template, feel very good, better realize the PHP source code and the separation of HTML. Now share some common variables of smarty.
1, smarty_dir SMARTY directory
Locate the full system
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.