In the process of PHP development, often need to send post requests, Post compared to get a lot more secure, and the amount of data transferred is also large. The following PHP programmer Rechesson to bring you together to summarize the several
Traverse the current directory and subdirectories. Encode all file translations into UTF-8
The code is as follows
Copy Code
PHP iconv.phpexec it on root dir$path = DirName (__file__);Tree ($path);function Encodefiles
The first way
$data = eval (' Return '. Iconv (' GBK ', ' Utf-8′,var_export ($data, True) ').Here the Var_export function can output or return a string representation of a variable. This function returns the structure information about the variable
Development, basically will display_errors,error_reporting open, help improve development efficiency, on-line, basically will turn off the page error information, in the error information, put in the file.
One, the error_log configuration of
The variable becomes a static variable as long as it is preceded by a keyword static.
function test (){static $NM =;$NM = $nm *;Print $nm. " ";}First time execution, $nm =Test ();First time execution, $nm =Test ();First time execution, $nm =Test ()
First, the initial site, the general need to do without WWW domain name 301 to go with the WWW domain name;
The code is as follows:Options +followsymlinksRewriteengine onRewritecond%{http_host} ^111cn.net [NC]Rewriterule ^ (. *) $
There's been a very hot question recently--print or sort the two ordered arrays. Just see this problem when also a bit of Mongolia, the best algorithm must use the orderly characteristics.
Think of a will find it is not very difficult, if the array
Let's build the injection statement.Enter in input boxa% and 1=2 Union select 1,username,3,4,5,6,7,8, password,10,11 fromalphaauthor# into the SQL statement.
SELECT * from alphadb where the title like%a% and 1=2 Union Select1,username,3,4,5,6,7,8,
Misuse of include 1. The reason of the loophole: Include is the most commonly used function in writing PHP Web sites, and supports relative paths. There are many PHP scripts that directly take an input variable as an include parameter, resulting in
There are a lot of functions in PHP that we rarely hear about, but they have very useful functions, such as glob (). Many people want to simply traverse the directory, if you know this function, will be twice the effort.
Glob is included in the
HTML
First, to understand what is the enctype attribute of the
Attribute Value Descriptionapplication/x-www-form-urlencoded default mode, all characters are encoded before they are sent to the server (spaces are converted to "+" plus, special
pdo::exec
Returns the int type representing the number of bars that affect the result.
Pdostatement::execute
Returns a Boolean, True indicates successful execution, false indicates execution failed.These two usually come out now:
The
Web service also called XML Web Service WebService is a lightweight independent communication technology that can receive requests from the Internet or other systems on an intranet. is to use the software services provided by soap on the web, using
Call WebService
The development environment is: Eclipse3.6 (Java IDE) + JDK 1.6 + Tomcat 7.0 + Axis2 1.6 + php 5.2.14 (IDE eclipse-php-helios-sr1-win32.zip) + apache2 .2.15, these software are updated at any time, please readers Google Baidu to
Example
The code is as follows
Copy Code
Include ("word.php");$word =new Word;$word->start ();?>
Create Word documents directly with PHP Create Word documents directly with PHP Author: axgle If you open
Json_encode This function is to play the role of data transfer between different languages, especially PHP for the data exchange between JS is very convenient.
But there are a few things to note when using this Json_encode function:
1 The data
One of the most original and simplest examples of IFRAME upload:
The foreground uploads the page index.html, mainly is a form and a JS callback function. When uploading a file, the form's method, Enctype property must be the same as the following
The following tools and software must be installed:– The shell script that modifies the password;–sudo access rights;–apache or LIGHTTPD Web server;–php Service-side program.
Step 1: Install shell scripts that can modify user passwords
This script
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