Description
Array Array_flip (array trans)
Array_flip () returns a reversed array, such as the key name in trans becomes a value, and the value in trans is the key name.
Note that the value in trans needs to be able to be a valid key name, such as
1. Do not turn to HTML entitiesA basic common sense: all untrusted input (especially the data submitted by the user from the form), and the output should be preceded by a change of meaning.
echo $_get[' Usename '];
This example has the potential to
Copy CodeThe code is as follows:
Specify page encoding to prevent the occurrence of garbled Chinese
Header (' content-type:text/html; charset=gb2312 ');
Start Excel
$ms _excel=new COM ("Excel.Application") or Die ("Cannot open Excel application");
* Ini_get (): Gets the option value of the configuration file
This function believes that many people have, that is, to get the value of an option in the configuration file, if the value of True returns 1, if the value of False returns 0, the
The following regular:
$a = ' 2
tóng
dòng
Canton 3 ';echo preg_replace ('/[^ /', ', $a);
Will prompt:
Warning:preg_replace (): Unknown modifier ' P ' in E:\phpLearn\test.php on line 12
Addcslashes-adds a backslash escape character for some characters inside a string
addslashes-characters inside a string are escaped in the specified manner
bin2hex-converts binary data to hexadecimal notation
alias function for Chop-rtrim
Copy CodeThe code is as follows:
/var/www/html/bt/e/btsys:.:/ Usr/share/pear:/usr/share/phpphp Warning:require (.. /class/connect.php): Failed to open stream:no such file or directory in/var/www/html/bt/e/btsys/torrents-scrape.php on L INE 17
PHP
Save the image to the database PHP code
Copy CodeThe code is as follows:
If ($Picture! = "None") {
$PSize = FileSize ($Picture);
$mysqlPicture = Addslashes (Fread (fopen ($Picture, "R"), $PSize));
Mysql_connect ($host, $username, $password) or Die (
It enables PHP to communicate seamlessly with the following technologies:
(1) Flash and Flex Remoting
(2) JavaScript JSON and Ajax JSON
(3) XML and XML-RPC
What is RPCRemote Program invocation (RPC, remote Procedure call) is a way for clients to
Extract () function syntax:int Extract (array $var _array [, int $extract _type = extr_overwrite [, string $prefix])
Function: Extract () function extracts an associative array (invalid for a numeric index array) each pair of keys and value,
Implementation principle:
is to sort the ID pair by the ORDER by id DESC or the ORDER by ID ASC, and then determine the article that is less than the current id> or the same column as the current article ID.
The SQL statements for the instance are
PHP with its ease of use is quickly promoted, but not easy to use it does not mean that it can be used, in fact, many programmers use it very easy to set up a Web application system, but how many people carefully consider their code, is easy to
The role of the cache needless to say that we all know, these days also interviewed some people, found that many people frame with more, the foundation has forgotten, you ask some things, he always said that the framework to solve, and do not
With the rapid development of PHP, more and more people with it, in the PHP array learning excerpt part of the basic PHP array to understand the establishment and the display of the group elements. Need to learn more about the operation of the PHP
How to use:
Memcached
Copy CodeThe code is as follows:
$cache = new Cache_memcache ();
$cache->addserver (' www1 ');
$cache->addserver (' www2 ', 11211,20); This server has double the memory, and gets double the weight
$cache->addserver (' www3 ', 1
1. If a method can be static, then declare that he is static, the speed can be increased by 1/4;
2.echo is more efficient than print, because Echo has no return value, and print returns an integer type;
3. Set the maximum number of cycles before the
Note: '//+ ' indicates additional notes for me
Class Typelink
{
var $typeDir;
var $dsql;
var $TypeID; + Category ID
var $baseDir; + Site root URL
var $modDir; + Template Catalog
var $indexUrl; + Home Link Address
var $indexName; + Home Link Name
var
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