In the past few days, I have tried to migrate the working machine to ubuntu for development. The first task after the system is installed is to install the development environment of php + mysql. I plan to install php5 and pdo_mysql directly. The
After reading the FonTomas "using Editplus to realize J2SDK visual programming" (see the http://www.csdn.net/Develop/article/15/15416.shtm) article, the author as a PHP programmer, developed the idea of letting Editplus debug PHP program. After my
The PHP string function library collects 51 PHP string processing functions.
The PHP string function library collects 51 PHP string processing functions.
Including calculating the length of a string, splitting a string, and searching for a
Rule 1: Never trust external data or input
The first thing that must be realized about Web Application Security is that external data should not be trusted. External data includes any data that is not directly input by programmers in PHP code.
Even if you develop a new large PHP program, you must use global data, because some data requires different parts of your code. Some common global data includes program setting, database connection, and user data. There are many ways to make this
Function get_ip_place (){$ Ip = file_get_contents ("http://fw.qq.com/ipaddress"); $ ip = str_replace (", $ ip); $ ip2 = explode (" (", $ ip ); $ a = substr ($ ip2 [1], 0,-2); $ B = explode (",", $ a); return $ B ;} above from the open source China
Magic reference occurs when $ _ GET, $ _ POST, $ _ COOKIE is passed.1.Condition: magic_quotes_gpc = offThe string written to the database has not been filtered. The strings read from the database are not processed.Data: bytes $ data = "snow" ''sun ";
String processing
A string is a collection of zero or multiple characters, including numbers, letters, special characters, and invisible characters.
1. Escape and restore the stringThe character string is often interpreted as a control character. To
In common programming, you sometimes need to obtain disk space usage. In most cases, the disk_free_space and disk_total_space functions are used.
The following instance obtains the disk space of all servers. The instance is as follows:
/**
*
Today, I discussed with my colleagues the role of the fflush function. I thought that the file system function of php should be built on the standard I/O library of the system. Therefore, the role of fflush is to fl the buffer of the standard I/O
This article does not involve the installation of PDO, but simply summarizes the use of PDO.
Start to construct the first PDO application and create a pdo. php file under the Web document directory:
[Php]$ Dsn = "mysql: host = localhost; dbname =
1
2 // Example use of getenv ()
3 $ ip = getenv ('remote _ ADDR ');
4 // Or simply use a Superglobal ($ _ SERVER or $ _ ENV)
5 $ ip = $ _ SERVER ['remote _ ADDR '];
6?>
This is the method provided by manual, the official PHP website.
However, when
[Php]Function downloadFile ($ fullPath ){ // Must be fresh startIf (headers_sent () // check if any header has been sentDie ('headers sent'); // Equivalent to exit () // Required for some browsersIf (ini_get ('zlib. output_compression ') // Gets the
A problem that has plagued Web developers for many years is how to add to their applications, such as file upload progress bars and real-time information. Users are impatient; they don't want to wait, while browsers are doing something, wondering if
According to my personal understanding, the array should be a contiguous space in the memory. Before using the array, you need to open up a blank memory of the specified size in the memory. If the declared size is smaller than the available
/** Class msg* Use for communication between php and php;* Create:* Author: leixun (lein_urg@163.com)* Version 1-*/Class msg {Private $ id;Private $ msg_id;Private $ _ serialize = true;/*** @ Param $ _ id ID*/Public function msg ($ _ id, $ _
Even if you develop a new large PHP program, you must use global data, because some data requires different parts of your code. Some common global data includes program setting, database connection, and user data. There are many ways to make this
The core idea of XPath design can be quickly introduced by xpath to locate the desired node. The main purpose is to describe the location of a node relative to another node. All qualified nodes can be obtained and become [location paths]. Xapth is
I. Fault symptom
The operating system used in the environment is windows XP, IIS is the built-in IIS 5, and PHP version is 5.2. According to the online steps, I installed the PHP program and configured the corresponding IIS ing parameters in IIS to
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