By default, most Web servers are typically configured for anonymous access, which means that users are generally not required to prompt for identity information when accessing information on the server. Anonymous access means that users can access
Defining arraysAn array of arrays is an ordered set of variables in which each variable is called an element.
first, define the arrayYou can use the array () language structure to create a new array. It accepts a number of comma-separated key =
Serialize () and unserialize () are explained in the PHP manual as:
Serialize-generates a storable representation of a value
Serialize-produces a representation of a value that can be stored
Unserialize-creates a PHP value from a stored
We define two PHP files for page01.php and page02.php, and we will try to pass the contents of the PAGE01 to PAGE02 and then let us continue to use them.
--------------------------------------------------------------------------------
The first
start the command line first
1. Run at the command line: taskkill/f/im Mysqld-nt.exe
The following operations are operating in the MySQL bin directory under some programs, if not configured environment variables, you need to switch to the MySQL
There are two ways to change the image size.(1): the imagecopyresized () function is valid in all GD versions, but the algorithm for scaling the image is coarser.
(2): imagecopyresampled (), the pixel interpolation algorithm gets a smoother image
Ceil: Calculates the smallest integer greater than the specified number.
Floor: Calculates the largest integer less than the specified number.
Round: Rounding.
Select as neededCopy the Code code as follows:
$a = 20;$b = 6;Echo ($a/$b). ""; Out 3.
$xml = simplexml_load_file (' Example.xml '); Create a SimpleXML objectVar_dump ($xml); Output XML?>
$xml = simplexml_load_file (' Example.xml '); Reading an XML fileforeach ($xml->depart as $a)//iterate through each depart tag in the XML
b/S: Web program based on browser and server architecture
C/S: QQ SVN client + server
simple text-line-based protocol:
Redis
Memcache
difference:
are stored data, memcache directly into memory, Redis saved in memory, saved to the hard disk
1. Set CookiesPHP uses the Setcookie function to set cookies. It is important to note that a cookie is a part of the HTTP protocol header that is used to pass information between the browser and the server, so the cookie function must be called
Similar to Mysql_fetch_row (), the function mysql_fetch_array () also gets the current row data in the result set and automatically slides down one line after the call. It is defined as follows.
Copy CodeThe code is as follows:
Array
Eaccelerator and Memcached are two of the most popular cache acceleration tools available in PHP today.
Eaccelerator is developed specifically for PHP, and memcached is not only used in PHP, but also in all other languages.
Main functions of
MVC
MVC is a design pattern that makes it mandatory to separate the input, processing, and output of an application. Using an MVC application is divided into three core parts: model (M), view (V), CONTROLLER (C), each of which handles its own
What is HessianHessian is an open source remote communication protocol provided by Caucho.
The use of the binary RPC protocol, based on the HTTP transmission, the server side does not have to open the firewall port.
The specification of the Protocol
As shown below:
Copy CodeThe code is as follows:
User name:
Password
Session_Start ();$_session["user"]=$_post[user];$_session["password"]=$_post[pwd];if ($_session[user]== "") {echo "
alert('用户名不能为空!');// -->
Command mode, the command pattern is a mechanism for encapsulating a common operation.
If you are familiar with C or PHP, you may have encountered command, which is equivalent to the following: Callback (callback) in the program. Callbacks
However, both IIS and Apache only compress the HTML class static files by default, for PHP files need module configuration to support (iis7.5 in dynamic + static compression can also), so the use of PHP's own functions to achieve the effect of gzip
This is from someone else's space, but I've never done it before. The comparison between the three of them, today also learned a bit.
Copy CodeThe code is as follows:
$arr = Array ();
for ($i = 0; $i $arr [] = $i *rand (1000,9999);
}
function
PHP global variables in the actual application will find a lot of problems we need to constantly improve processing. In this article, we give some specific solutions to the problems that arise with the PHP global variables.
the role of the 1:php
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