Design PHP include and require in the two functions, can be in the design of the site to improve the construction efficiency and maintenance of the site, now detailed explained as follows:
The include function is different from the preprocessing
As described in Mr. Pengwuchen's PHP BIBLE, the header can send a status header, such as
header ("status:404 not Found");
?>
can make the user's browser appear file cannot find 404 error, but I tried this is not possible.
later I went
As a walking lake for many years old Chinese medicine, today was ordered to solve a case of the front-end page show slow problem. The status of the problem page is as follows:
Apache + PHP
Using the Smarty template to output content
The final
PHP upload a single picture to the server, the following code:
Session_Start ();
Include ("conn.php");? >
Flyer pictures to server and display-www.cxybl.com
"
"
As described in Mr. Pengwuchen's PHP BIBLE, the header can send a status header, such as
header ("status:404 not Found");
?>
can make the user's browser appear file cannot find 404 error, but I tried this is not possible.
later I went
PHP supports inline HTML, so what happens to HTML in PHP files outside of PHP tags? What is the difference between it and direct output HTML?
PHP provides an error suppressor ' @ ', how does it block the error output? When should I use it?
This is
The site is slow to open, the reason is many, remove the network itself, the reason is not to say, the server and the program itself is also affecting the slow opening of the site is an important reason. The following combined with some of their own
Variables in one of my recent projects, I found a new concept about using variables in PHP. In my program, I need to update multiple records on one page at a time, and after a long period of painful thinking, my mind accidentally flashes the concept
For statements can be said to be PHP (but also many languages) of the loop control part of the most basic statement of the execution of the For statement and the basic usage here is not much to say, you can see the PHP Manual for statement section.
Attack | Trojan Horse
1. To prevent out web directoryFirst Change httpd. conf, if you are only allowed to your PHP scripts in web directory in the operation, you can also modify the httpd. CONF file PHP limits the operation of the path. For example,
Copy CodeThe code is as follows:
/**
* Responsibility Chain Mode
*
* To unlock the coupling between the sender and receiver of the request, use multiple objects to process the request, connect the objects into a chain, and pass the request along the
Copy CodeThe code is as follows:
/**
* Factory Method mode
*
* Define an interface for creating objects, let subclasses decide which class to instantiate, and delay the instantiation of a class to its subclasses
*/
/*
Class Dbfactory
{
public
Copy CodeThe code is as follows:
/**
* Policy mode (strategy.php)
*
* Define a series of algorithms, encapsulate them one by one, and make them interchangeable with each other, and the change in the algorithm can be independent of the client using
Then if you consider the measures to break the chain of anti-theft, you need to consider the http_referer above the tamper. The corresponding variable in the PHP script is $_server[' Http_referer ', which stores the Http_referer value.
Because the
Tips | Scripting If you're an adventurer and you're running PHP on a CGI, ISAPI, or Apache version of a Windows system, you can also get the COM functionality of the system. Now, the job of interpreting COM (Microsoft's Component Object model) has
function | Chinese Characters | graphics | display /******************************
How to display Chinese characters in PHP graphics function, we have been asking for a long time, but there has been no results. Finally in the reference to another
I have always been running in ISAPI mode Php (as the current mainstream development language) , the biggest disadvantage of this approach is poor stability, when Php Apache The process also died when the error occurred. Later I saw an introduction
Copy Code code as follows:
$a = Array (' A ', ' B ', ' C ', ' d ');
Unset ($a [2]);
Print_r ($a);
But the biggest disadvantage of this approach is that the array index is not rebuilt.
After checking the data, PHP provides this functionality.
For example:
Copy Code code as follows:
function say () {
Alert (arguments[0]+ ' said: ' +arguments[1]);
}
Say (' Fanglor ', ' Fanglor is a boy! ');
Results: Pop-up Fanglor said: Fanglor is a boy!
-------------------------------------------------
From the browser, the use of header (location) to jump to another page, but in fact, PHP will still execute the background code, if the following code has unsafe logic, then directly disregard the conditions set by the developer, continue to carry
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