Send a simple example first
Copy CodeThe code is as follows:
if (!is_dir (' txt '))//Determine if TXT is a folder directory
{
mkdir (' txt ');//Create a folder directory named txt
$open =fopen (' txt/in.txt ', ' w+ ');//Open file in read-write
First, MongoDB IntroductionMongoDB (named from "Humongous") is a scalable, high-performance, open-source, schema-free, document-oriented database that combines the benefits of a document database, key-value pair storage, and relational database.
Either JCE or CKEditor, did not solve the problem of Chinese name file, either upload failed, or passed the Chinese name can not be accessed by the Web. In contrast, JCE is more user-friendly, such as file upload is selected by default, do not need
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
Binary method finds whether an array contains an element, is compatible with the pros and cons, and the code implements:
Copy CodeThe code is as follows:
$searchValue = (int) $_get[' key '];
function search (array $array, $value)
{
$max = count (
Buffer----Flush ()
Buffer is a memory address space, the Linux system default size is generally 4096 (1KB), that is, a memory page. It is primarily used to store data between devices that are out of sync or between devices with different priority
1. Related to MySQL
Mysql_connect
Establish a connection to the MySQL server
Grammar
Resource mysql_connect (String server[,string usingname[,string password[, BOOL New_link[,int Client_flags]]])
eg
Copy CodeThe code is as follows:
$DB _host =
These words have a special meaning in PHP. Some of them are like functions, some like constants ... But they are not, they are only part of the language structure. You cannot use any of them as constants, method names, or class names. However, they
As shown below:
Copy CodeThe code is as follows:
Class Curl {
/*
* Get method get access to specified address
* @param the address to be accessed by the string URL
* @param the storage address of a string cookie cookie, no cookie is sent
* @return
Iterator (Iterator) mode, which provides an abstraction on a very common process: an iteration on a set of objects (or scalars) in an unknown part of an object graph. Iterations have several different methods of execution: Iterating over Array
Function code One: delete all files in directory and directory
Copy CodeThe code is as follows:
Loop Delete directory and file functions
function Deldirandfile ($dirName)
{
if ($handle = Opendir ("$dirName")) {
while (false!== ($item = Readdir
It's all right. Write the function that the directory wants to close
including traversing files under this folder, directory subdirectories read the current file under directories and files delete the directory subdirectories under the current
How do I convert four fields with a point-separated IP address protocol to an integer? PHP has such a function ip2long.
Copy CodeThe code is as follows:
Echo Ip2long ("10.2.1.3");
?>
we will get167903491
This is how to calculate, currently I
2 PHP Test filesserver.php
Copy CodeThe code is as follows:
Phpinfo ();
Ensure that the client is not timed out when connecting
Set_time_limit (0);
$ip = ' 127.0.0.1 ';
$port = 1935;
/*
+-------------------------------
* @socket the entire process
1. Convert a string to an arrayStr_split () is used to convert a string into an array
Syntax:
Copy CodeThe code is as follows:
Str_split (String,length)
//String is a must, is to be divided by the strings;
Length is optional and specifies the
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