The following code for the PHP method to remove the current directory and subdirectories all the file BOM information code, create a new file, put it down root directory, and then browser access.
Copy the Code code as follows:
if (Isset ($_get['
first, the implementation of merging and compressing multiple JS and CSS file code
Html:
Copy the Code code as follows:
Php:
Copy the Code code as follows:Output JSHeader ("Content-type:application/x-javascript; Charset:utf-8 ");if (Isset
Originally wanted to upload pictures with the plugin, and then wrote a simple JS to achieve asynchronous image upload, not much to say on the code is very simple
upload.php
if (Isset ($_files["myfile"))
{
$ret = Array ();
$uploadDir = ' images '.
A simple PHP news release System tutorial (first edition) First: Establish a database with phpMyAdmin first establish a database, named Yayu. Create a data table under this database, called News. Here's a key point, which is to create the fields
The header information is defined first, indicating that an Excel is output. And then in the form of table to the database of the information loop echo out, just fine.
Copy the Code code as follows:
Header ("Content-type:application/vnd.ms-excel"
1.upload_file.php
This file is responsible for getting the uploaded image extension and randomly generated file name
Header ("Content-type:text/html;charset=utf-8");
/**
* Get file name extension
*enter description here ...
* @param
First, the use of benchmark testing, testing the performance of the Code
When a benchmark involves a web application, it usually refers to a "stress test" that loads as much traffic as possible in your code and then measures its ability to execute.
Have their own host generally will design "anti-theft chain", in fact, including pictures of anti-theft chain, and download anti-theft chain, such as:
1. Use the. htaccess to set up the anti-theft chain
Copy CodeThe code is as follows:
First, filter the input, avoid the output
Sometimes we abbreviated the phrase "filter input, avoid output" to Fieo, which has become a security mantra for PHP applications.
1, using CType to verify
Ctype:http://php.net/ctype
2. Validation with Pcre
Definition and usage
The Filemtime () function returns the last modified time of the file's contents.
If successful, the time is returned in the form of a Unix timestamp. If it fails, it returns false.
Grammar
Filemtime
Open the installation path of the Apache server (I use wampserver), there is a Ab.exe executable program in the bin directory, it is the stress test tool to be introduced.
Under the Windows System command line, go to the directory where the
PHP often use arrays, PHP arrays powerful, and fast, read and write can be done in O (1), because it is the size of each element is consistent, as long as the subscript, you can instantly calculate its corresponding elements in memory position, so
These days in writing a PHP anti-theft chain external resources download processing function, just finished writing last night, encountered some problems in the middle, here is not detailed;
The following is a self-written simple PHP anti-theft
The following are some of the experiences that we end up with when we develop a project at Shun Yi Network .
Main reference: Yii official website http://www.yiiframework.com/wiki/60/The YII Framework provides 2 sets of access systems, one is a
BOOL Flock (resource $handle, int $operation [, int & $wouldblock])
HandleA file system pointer, which is a resource (resource) typically created by fopen ().
Operation can be one of the following values:1. Lock_sh Get a shared lock (read program).2
Parameter description: CHT=QR: Necessary parameters, fixed value
, indicating that a QR code is to be generated chs=
X
: Necessary parameters, generate two-dimensional code size, units are pixels, the current generated QR codes are
Recently took a small job to make a dynamic Web site that uses the PHP language and MySQL database. Previously done type of website, is done under the Windows system, the development environment uses the Appserv PHP Development Kit. Now that I have
Small series for everyone to share a beautiful PHP code class. Need friends can come over to the reference!
PHP Verification Code Class code
Width= $width;
$this->height= $height;
$this->counts= $counts;
$this->distrubcode=
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