echo $_server[' php_self '], ''; Address of this pageecho $_server[' Http_referer '], '';//link to the address of the previous page of the current pageecho $_server[' Script_filename '], ''; Absolute path of the current scriptecho $_server['
There are two basic output modes in PHP: Echo and print.
In this section, we'll discuss the use of both statements in detail, and demonstrate in the example how Echo and print are used.PHP Echo and Print statementsEcho and Print
Interface:
html>head>title>Login
title
>
Head
>body>formname="Fangbei"method="POST"action ="check_session_login.php">divStyle="width:353">dl>DT>
DT
>dd>divAlign="Left">Username:inputtype="text"name="username" />
Div
>
After learning C,java and then wait until the PHP study, today finally understand what is object-oriented.
For example: A mobile phone is a class, keyboard, battery, screen and so on is a member variable, and telephone, texting and so on is the
AllowOverride none Allowall
The Allow from all means that all the file paths do not require permissions and can be accessed, which is necessary when we develop the site, because all of our pages are a file corresponding to the disk path, and if
inheritance and polymorphism are the reuse of classes, one for class-level reuse and one for method-level reuse.
a combination of classes and inheritance.
low coupling, decoupling, tight coupling.
Problems with Inheritance:1. Inheritance destroys
From eclipse to vim, I didn't find a single-step breakpoint debugging function, very uncomfortable, and then searched, found the Xdebug+vdebug solution.
Installing Xdebug
Environment: CentOS 6.5Installation of
http://php.net/manual/zh/function.htmlspecialchars.php
Many people think that htmlentities and htmlspecialchars function is the same, are formatted HTML code, I used to think so, but today I found that is not the case.
These two functions in the
There are many kinds of load balancing technology, the common four/seven Layer load balancing technology contains many, Nginx reverse proxy is one of the schemes.
The following configuration is an Nginx reverse proxy configuration sample:
User www
Variable is empty
The following things are considered to be empty:
"" (empty string)
0 (as 0 of integers)
0.0 (as 0 of floating-point numbers)
"0" (as a string of 0)
Null
FALSE
Array () (an empty array)
$var; (
Here is the simplest example of connecting to a database, as long as the data obtained, we can give him to the foreground, and ultimately constitute a dynamic site
$conn is a resource that connects to a database$c >mysql_query ("View
Download the corresponding version of the PHP source code and unzip, my version is php-5.4.16
Enter the source directory of the Ext/mysqlnd, and compile the mysqlnd.so
cp config9.m4 config.m"s{ext/mysqlnd/php_mysqlnd_config.h{config.h{"
Example code:
$a'10';var_dump(gettype($a));settype($a,'int');var_dump(gettype($a));
At this point the output is: string, Interger
But if:
$a10;var_dump(gettype($a));settype($a,'int');var_dump(gettype($a));
At this point the output is Interger
1. Single entry: All requests for the entire site request a file, index.php
2. Single-entry design concept: MVC
3. The controller parameters and the action parameters must be carried when the index.php is requested (distributed at initialization
1.php, as a weakly typed language, does not need to explicitly indicate the type of the variable, but the PHP variable is also of type, and the PHP variable contains the following 8 variables (three major categories)
A. Scalar type: boolean,integer,
PHP class Library to the existing image plus text watermark, the code is not very perfect, welcome everyone to advise! The code is as follows:
img (picture path, watermark text, font path, font size, font angle); For example: $tpl->img (' Abc.jpg
This example describes the date usage in symfony2.4 's twig. Share to everyone for your reference, as follows:
Get current time:
{"Now" |date ("Y-m-d")}}//2014-03-06
Get three days after the time
{{"+3 Day" |date (' y-m-d ')}}//2014-03-09//or
Brief introduction
Composer is a dependency management tool for PHP
installation process
Open the terminal and enter the following command:
Enter the user root directorycd ~Execute Installation Instructionsphp -r
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