In the PHP Web development process, if you set up a site involving a large number of image processing, must involve picture upload, zoom, and how to keep the picture is not distorted, is a lot of beginners PHP Web developers more headaches, today,
a code execution function
A function in PHP that can execute code. such as Eval (), assert (), ', System (), exec (), shell_exec (), PassThru (), Escapeshellcmd (), pcntl_exec (), etc.
Demo Code 1.1:
Two file contains code injection
The file
PHP programming often need to use some of the server data, special $_server detailed parameters, easy to use later.
$_server[' php_self '] #当前正在执行脚本的文件名, related to document root. $_server[' argv '] #传递给该脚本的参数. $_server[' argc ']
A lot of friends without foundation, often ask PHP file how to open, in fact, PHP is a web script, but different from HTML XML tag language, can be opened directly through the browser, you need to have PHP running environment to access and open the
Note: If you want to use PHP GD processing we need to open the GD library
GD Library support for PHP under Windows
Find php.ini, open content, find:
; Extension=php_gd2.dll
Put the front semicolon ";" Remove, then save, if there is no semicolon,
$_server["REMOTE_ADDR" is often used in PHP to obtain client IP.(1) But if the client is using a proxy server for access, then the IP address of the proxy server is taken, not the real client IP address. To obtain the client's true IP address
checkdnsrr-DNS traffic checks for the specified host (domain name) or IP address
closelog-Turn off System log links
define_syslog_variables-initialization of all syslog-related variables
DNS_CHECK_RECORD-CHECKDNSRR Alias
DNS_GET_MX-GETMXRR Alias
dns_
1. File directory operation
The top stop record is the disk root directory, with '/' or '/'
Current directory./
.. /Represents the Apache directory, the Htdocs directory
1. Create and delete directories mkdir
Copy CodeThe code is as follows:
if
1. The MAGIC_QUOTES_GPC option in the PHP configuration file php.ini is not turned on and is set to off2. Developers do not check and escape data typesBut in fact, the 2nd is the most important. I think that it is the most basic quality of a web
PHP implements the effect of copying Baidu Library and douding online documents (word, excel, ppt to flash ),
The example in this article describes how PHP implements the online documents of imitation Baidu Library and douding. We will share this
Php enable and Disable Error prompt is applicable to php. ini modification permissions, error prompt php. ini
Windows system switch php error prompt
If you do not have the permission to modify php. ini, you can add the following code to the php file:
PHP5.3 graphic tutorial on installing Zend Guard Loader,
Zend Optimizer/3.3.3 decryption and code optimization improves the execution speed of PHP applications and significantly reduces the server's CPU load.Zend Guard Loader/5.5.0/6.0 decryption
PHP 5.3 new magic method _ invoke overview, 5.3 _ invoke
PHP has added a magic method named _ invoke since Version 5.3. Using this method, you can directly call an object after creating an instance. Example:
class testClass{public function
PHP date function date format UNIX time Method
This article describes how to format the UNIX time using the date function of PHP. The example shows how to use the date function in php. For more information, see
This example describes how to
Through learning the PHP language, you should know that it is a function-based HTML scripting language. The huge function library supports the implementation of PHP functions. Next we will introduce the usage of PHP functions isset () and empty.
In general, MySQL optimization can be divided into two levels: one is Optimization at the MySQL level, such as SQL rewriting, index addition, and configuration of various MySQL parameters; the other layer is the operating system and hardware.
In php, operators are the most basic knowledge point in our program development. next I will introduce you to some common usage of php operators in PHP.
In php, operators are the most basic knowledge point in our program development. next I will
PHP code uploads music at the background. you can download and play music at the front-end ~ How can I insert a music file into a database? is it saved to its address? When broadcasting at the front end, the music name is made into a hyperlink and
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