This article copyright belongs to Li Dequan all, reprint please specify
After friends, Lao Li found a zend studio PHP development platform, tried a feeling is also good, basically need to have the function, it is determined to use it. In the Ecshop source file can not find the project file, but this can not be difficult to old Lee. The entrance page of the mall is index.php, then open the index.php file first, then set a breakpoint at the beginning to try it, the result is very well. Maybe some people have to ask, why not start with the architecture? Why not start with the template mechanism? Lao Li is thinking like this, Ecshop Road 0.x course is to talk about some of the basic knowledge of development, such as PHP, Smarty, MySQL, etc., the master is still concerned about the follow-up Ecshop Architecture Chapter!
In the Debugging window, Lao Li saw a lot of non-known variables (such as), where did it come from? What's the use of it?
Here are some basic things to know. As is known to all, any development language is variable (nonsense, hehe), PHP is the same. PHP variables are divided into two parts, part of the user-defined variables, the assignment between variables can have value assignment and reference assignment (difference in whether or not to share memory). The other part is what we're going to say next. php predefined variables, by manipulating PHP predefined variables, we can obtain information such as user sessions, user operating system environments, and the environment of the local operating system.
Variable name |
Description |
$GLOBALS |
is an array of all the defined global variables. The variable name is the index of the array. It can be called a super collection of all the super variables. |
$_cookie |
The information passed to the script via HttpCookie. Most of these cookies are set by the Setcooke () function when the PHP script is executed. |
$_env |
Executes the variables that the environment submits to the script. Similar to the old array $HTTP _env_vars array (still valid but opposed to use) |
$_files |
A variable that is submitted to the script via an HTTP POST file upload. Similar to the old array $HTTP _post_files array (still valid but opposed to use) |
$_get |
Contains information about the parameters passed by the Get method. Used primarily to obtain data submitted through the Get method |
$_post |
Contains information about the parameters passed through the Post method. Used primarily to obtain data submitted via the Post method |
$_request |
A variable that is submitted to the script via the get,post and COOKIE mechanism, so the array is not trustworthy |
$_server |
Variables that are set by the WEB server or are directly associated with the execution environment of the current script, such as the server IP address, host name, and so on |
$_session |
Contains information about all session variables. It is primarily applied to session control and to the transfer of values between pages. |
After saying the predefined variables, Lao Li suddenly felt that there was nothing to talk about. Is nothing more than control statement If...elseif...else, circular statement While,do...while,foreach, but still want to remind everyone, pay attention to the difference between double and single quotation marks. As for cookies and sessions, it is a matter of which development platform is used in a BS program. Well, Lao Li can't wait to see MySQL.
1.0 Ecshop Opening Benefit-Preface
1.1 Ecshop Road-Installation
1.2 Ecshop Road-php
1.3 Ecshop Road-mysql
1.4 Ecshop Road-smarty