A large number of smiplexml functions can be used to load and parse a large number of XML documents.
--------------------------------------------------------------------------------
1.
simplexml_load_file ()function to load the specified XML file
If the user enters a query that is inserted directly into an SQL statement, the application is vulnerable to SQL injection, such as the following example:
Copy CodeThe code is as follows:
$unsafe _variable = $_post[' user_input ');
mysql_query
These two functions return an array, the difference is that the first function returns an array that contains only the values, we can only $row[0],
$row [1], which reads the data as an array subscript, and the array returned by Mysql_fetch_array ()
Inadvertently found in the computer there is such a MySQL connection class, also do not remember where the collection, paste it up.
A few show_databases and show_tables .... Such methods have used a bunch of echo, as if always do not like in the
Nginx CacheNginx has two kinds of caching mechanisms: Fastcgi_cache and Proxy_cache
Let's talk about the difference between the two caching mechanisms.
The Proxy_cache role is to cache the contents of the backend server, possibly any content,
PHP page Jump One, header () functionThe header () function is a very simple way to jump a page in PHP. The main function of the header () function is to output the HTTP protocol header (header) to the browser.
the header () function is defined as
1. The line of the iteration file
Copy CodeThe code is as follows:
public static IEnumerable
ReadLines (String fileName)
{
using (TextReader reader = File.OpenText (fileName))
{
String line;
if (line = reader. ReadLine ()) = null)
{
yield
Because the PHP process is not multi-threaded, some scenarios for convenience and improve performance, you can use PHP to achieve a multi-process to compensate for this deficiency:
Copy CodeThe code is as follows:
#!/usr/bin/env PHP
$cmds =array (
Several of the following examples are involved in the PHP algorithm collation.PHP bubbling
PHP binary method
PHP prime
PHP multiplication Table
PHP Bubbling Method ExampleCopy the Code code as follows:PHP bubbling from small to largeFunction Maopao
The usage of the three functions for PHP (), Isset () and Is_null () has been discussed a lot, and a lot of data may not be clear. Here again, but not from the concept, the direct use of program examples to speak, it should be more profound memory.
Required Environment:PHP 5.3.3
Apache 2.2.7
MySQL 5.5.8
Related Documents Download:
Click to downloadUnzip the memcached_1.2.5 document, execute memcached.exe-d under cmd-install
Unzip the Php5.3_vc6_memcachedll document and copy the
As shown below:
Copy CodeThe code is as follows:
//=============================== Time Date ===============================Y returns the last two digits of the year, the Y-year four digits, the M-month number, and the M-month English. D Month
Heredoc technology, usually not detailed in regular PHP documentation and technical books, just mentions that this is a Perl-style string output technique. But now some of the forum procedures, and some of the article system, are clever use of
PHP itself does not have many threads, but it can be curved to produce the same effects, such as multi-process ways to reach asynchronous calls, only in command mode.
There is also a simpler way to use the WEB program, which is to use Fsockopen (),
PHP Optimization for PHP optimization is mainly related to the php.ini in the main parameters of the reasonable adjustment and settings, the following we will look at some of the php.ini in the performance of a large number of parameters should be
PHP unset Global variables can only be destroyed in the actual use of local variables, and can not achieve the purpose of global variables. Let's take a concrete approach to this problem. We hope to help you.
Some functions of the language in PHP
PHP operating mode has 4 minutes:1) CGI Universal Gateway Interface (Common Gateway Interface))
2) fast-cgi resident (long-live) type CGI
3) CLI command line run (Interface)
4) Web module mode (module mode for Web server running like Apache)
1.CGI (
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