UsageHttp_build_query ($formdata [, String $numeric _prefix[,string $arg _spearotor]])
The Http_build_query function is added to PHP tutorial 5 to convert an array or object to a URL querystring
*/$data =array (' foo ' => ' Bar ',' Baz ' => ' boom
Multi-File upload system full version
Include (".. /include/common.inc ");
$title = "Upload program for multiple files";
Include (".. /include/header.inc ");
Define the number of files allowed to be uploaded
Define ("Upload_no", 10);
Echo (" Welcome!
Deletedir ($dir)//This delete file and directory code can be placed in the win Lin U system Delete,
{
if (RmDir ($dir) ==false && is_dir ($dir)) {
if ($DP = Opendir ($dir)) {
while (($file=readdir ($DP))!= false) {
if (Is_dir ($file) && $file!= '. '
One, the article List question: Create a field in the database, record the file name, each generation of a file, the automatically generated file name is stored in the database, for the recommended article, just point to the folder that holds the
has been playing PHP for some time, the basic is From0 began, often appear in a lot of problems, slowly can be skilled query documents, and, experience is not a lot.
First Lookhere. :
Error_reporting (1048);//1,2,4,7,...,1048Ob_start
SendMail is the most widely used message transfer agent for mail delivery/acceptance in UNIX environments. Here's how to use SendMail to work with PHP email
Install SendMail and MAILX
Yum-y Install SendMail MAILX
Start
/etc/rc.d/init.d/sendmail
Static variablesAfter a function is executed, its storage space is automatically released. Static variables are stored in the bucket after the function is executed. If you want to use the function's variable results for calculation, you need to set
Let's take a look at the strip_tags () function usage.In the following example, all tags except the tag are deleted: The code is as follows:Copy code $ Input = "This example Is yanshare ! ";Echo strip_tags ($ input, " ");? & Gt;Input
When php runs on the windows IIS platform, some things are different from those in Linux apache.Today, we encountered a magic problem: using $ URI =$ _ SERVER ["REQUEST_URI"];In linux, we can see the URL after urlrewrite is static/exy/exk/list-3/In
1. Cause analysis:When it is stored in the database! MySQL does not store unicode characters:MySQL only supports basic multilingual flat characters (0x0000-0 xFFFF ). Please try to store a synonym opposite :)Update: MySQL 5.5.3 (not yet GA). You can
The following is an error of Discuz.Fatal error: require_once () [function. require]: Failed opening required '. /source/class/class_core.php '(include_path = '.; c: php5pear ') in D: webBBSindex. php on line 14SolutionModify the php. ini
Urlencode(PHP 4, PHP 5)Urlencode-encode a URL stringReport a bug descriptionString urlencode (string $ str)This function allows you to encode a string and use it in the URL request section. It also allows you to pass variables to the next
1. Select UTF-8 encoding when creating a database.2. Select UTF-8 encoding when creating php files3. Prevent garbled characters in data transmission mysql_query ('set names utf8 ');4. Add to the static page.Personal suggestion: we recommend that
I. Nginx startup script/etc/init. d/nginx. The code is as follows:Copy code #! /Bin/bash## Startup script for Nginx-this script starts and stops the nginx daemon## Chkconfig:-85 15# Description: Nginx is an HTTP (S) server, HTTP (S) reverse
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