Not much to say, directly on the code
Copy CodeThe code is as follows:
Link Database ' query
mysql_connect (' localhost ', ' username ', ' userpwd ') or Die ("Database link Failed". mysql_error ());
mysql_select_db (' Library name ');
mysql_query ('
Some browsers install the PDF opener associated to the browser, so the direct way to write the PDF path is to open the PDF instead of the download, below I say if let them just download, not browse.
Create a PHP file
Copy the Code code as
After two days of regular expression learning, and the study of WordPress routing function, the successful implementation of the custom WordPress routing function, the following is the implementation of routing rules.
If you have a custom URL
Suppose that the array is called $my _array;
Copy the Code code as follows:
Creates a new, empty array.
$tmp _array = Array ();
$new _array = Array ();
1. Loops out all the rows. ($val is a row)foreach ($my _array as $k = + $val) {
$hash = MD5
php5.3 comes with PHP-FPM/usr/local/php/etc/php-fpm.conf
PID = Run/php-fpm.pid
PID settings, default in the installation directory of Var/run/php-fpm.pid, it is recommended to open
Error_log = Log/php-fpm.logError log, default in the installation
such as: The time is exactly 5 minutes ago, then the corresponding timestamp will be formatted as 5 minutes ago, not much to say, directly affixed to the code:
Copy CodeThe code is as follows:
/**
* Format time
* @param integer $timestamp timestamp
First of all, this article is based on the WAMP environment, so if you see here has not set up a good wamp environment, I would mind you first build the environment, because here are some practical content.
1. Preparation
In the WAMP environment,
Let's start with a two array
Copy CodeThe code is as follows:
$r = Array (1,2,3,4,5,6);
$e = Array (7,8,9,10);
?>
Now let's use the Array_merge and the plus sign to why these two arrays
Copy CodeThe code is as follows:
Print_r ($r +e); Output
Copy the Code code as follows:
$conn =mysql_connect (' 192.168.0.220 ', ' root ', ' 123 ');
if (! $conn) echo "Failed!";
else echo "Success!";
SQL statement that extracts information from a table
$sql = "SELECT * from user where username= ' $user _
Copy the Code code as follows:
The first form of a notation
$da = Date ("W");
if ($da = = "1") {
echo "Today is Monday";
}else if ($da = = "2") {
echo "Today is Tuesday";
}else if ($da = = "3") {
echo "Today is Wednesday";
}else if ($da = = "4")
Here implementation of the PHP import and export Excel function is open source Phpexcel, do the following before you download the class library file, the official website: http://www.codeplex.com/PHPExcel, the website case code a lot, export PDF and
This program is the use of 3.x Firefox browser can read the characteristics of local files, to achieve through the XMLHttpRequest upload large files function, and can upload the process of dynamic display upload progress. Slightly modified, and with
The PR value is one of the most important criteria for Google's measurement of the site and gets the PR value based on the results provided by Google, such
Sometimes in order to achieve a certain purpose, we need to sort the two-dimensional array, and now share the method of its implementation.
Copy CodeThe code is as follows:
$arr =array (
' 1 ' = = Array (' Date ' = ' 2011-08-18 ', ' num ' = 5),
' 2
The following is the PHP method for generating ean_13 standard barcodes, which requires a PHP+GD environment
Copy CodeThe code is as follows:
function Ean_13 ($code) {
The width of a unit
$LW = 2;
High barcode
$hi = 100;
The guide code was no
One is the use of PHP PDO, a odbc,com interface to connect to an Access database.
Using PDO to connect to an Access database
Copy the Code code as follows:
$path = "F:fontwww.php.netspiderresult.mdb";
$conn = new PDO ("SQLite: $path");
if ($conn)
{
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