This is a php +txt text file online call voting system, without database support can complete the online user survey function, the details are as follows
Online survey program code Investigation Project a Survey Items two
This article illustrates how PHP handles the method with Chinese URLs. Share to everyone for your reference, specific as follows:
IE6 hyperlinks there will be problems in Chinese, the evil IE6 ah. PHP so that the built-in UrlEncode function is also
This article describes the PHP implementation of bulk Delete horse files and bulk replacement page content method. Share to everyone for your reference, specific as follows:
read ())) {if ($v = = "" | | $v = = "...") continue; $file =
In PHP 301 REDIRECT implementation is very simple, we simply use the header to send 301 status code, and then use header to jump, the effect and Apache,iis,nginx are the same effect oh.
One: This method is more recommended because it can transfer
1. Try to be static:
If a method can be static, then declare it static, speed can be increased by 1/4, even when I test, this improved nearly three times times.
Of course, this test method needs to be performed above level 100,000, the effect is
To determine repeat occurrences
Until now, you already know how to match a letter or number, but more often than not, you might want to match a word or a set of numbers. A word consists of several letters, and a set of numbers has several singular
First, the basic principle
Consider intercepting the interface that PHP reads from the source file. In the beginning, I considered processing from the interface between Apache and PHP, see Apache's src/modules/php4/mod_php4.c (this is the file that
An analysis of the external contract of PHPCall Sockets with PHP code, use the server's network to attack other IP directly, common code is as follows:
Copy Code code as follows:
$packets = 0;
$ip = $_get[\ ' ip\ '];
$rand =
This article illustrates the problem of confusing length calculations in PHP. Share to everyone for your reference, specific as follows:
Often by the PHP array and string character functions dizzy, summarized below:
strlen ($string) function :
Array_rand () is useful when you want to take one or more random units out of an array. It accepts input as an input array and an optional parameter num_req, indicating how many units you want to take out-if not specified, the default is 1.
Main Compatibility: PHP 5
First, chdir--Change Directory
Syntax: BOOL ChDir (string directory)
return value: Integer
Function Type: File access
Content Description:
Change the current directory of PHP to directory. Directory: The new current
Pre-defined constants in PHP:
__file__
The script file name that is currently being processed. If used in a contained file, its value is the included file, not the file name that contains it.
__line__
The current number of rows for the file
1, the role of this function: To remove the duplicate elements in the array and key name sorting
function Assoc_unique ($arr, $key) {
$tmp _arr = Array ();
foreach ($arr as $k => $v) {
if (In_array ($v [$key], $tmp _arr)) {
Unset ($arr [$k]);
} else
1. Linked database Common method: conn.php
Copy Code code as follows:
First step: Link the database
$conn = @mysql_connect ("localhost:3306", "root", "root") or Die ("MySQL link failed");
Step Two: Select the specified database,
Second, the preparation of beautiful code
1. Separate the background program from the front-end program
When writing a PHP program, some of the code is used to handle transactions, such as manipulating the database, doing math, and so on, while some
This article is an example of how PHP implements automatic submission of forms based on fsockopen and curl. Share to everyone for your reference, specific as follows:
Fsockopen and curl All can do PHP automatic submission Form
1. Fsockopen Method:
The past few weeks have been a rather complicated experience for me. I was one of the big layoffs in our company, but it was a pleasure to experience. I've never been expelled, so it's hard not to think too much. I started browsing the recruiting
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