This article is suitable for beginners of the small white PHP directory operation functions related to understanding.
";
To determine the directory while ($filename = Readdir ($DH))!== false) {//Direct judgment is not true, because 0 may appear,
The PHP two-dimensional array is sorted by a key value
$arr =[
Array (
' name ' => ' Little Bad Dragon ',
' age ' =>28
),
Array (
' name ' => ' small bad Dragon 2 ',
' age ' = >14
),
Array (
How PHP gets the localization time
local time zone identifier
$timezone _identifier = "Asia/hong_kong";
Set the local default time zone for all date-time functions in a script
Date_default_timezone_set ($timezone _identifier);
$aToday = getdate ();
Theory: Object oriented: A way of recognizing or perceiving things (analogy)
object is the result of a class being instantiated
Object (substance, object)
Instantiate object: Assigns a memory space to the current new class and places the
Original http://www.cnphp6.com/archives/63604
This is how the Version_compare () function is described in the PHP manual:
Version_compare () is used to compare the version number string of two "php normalization. This is useful for writing programs
Recently uploaded their blog to the Aliyun server, the results in the download vendor package, the need for the expansion of PHP FileInfo, this would like to install expansion is a very simple thing, but the trouble is still there, make the time is
First of all, it is stated that the browsing cookie operation is implemented through the HTTP header (commonly known as the "HTTP Header"). All the cookie data transfers between the server and the client are done through the HTTP request
Because the PHP web default upload file size is limited, need to upload large files need to modify the php.ini file. A. Locate the file Uploadsh area in the php.ini file modify the following parameters: 1. File_uploads = on; whether to allow the
Compress a file
We build a file into a compressed package.
open ($filename, ziparchive::create); Open the compression pack
$zip->addfile ($path, basename ($path)); Add a file to the compressed package
$zip->close (); Turn off compression packs
Let the browser access the PHP file through the Chinese path, as shown below
Need to set URL rewrite, and use Iconv function in index.php file
Iconv ("Utf-8", "GBK", $_get["url"]);
The directory structure is as follows
In the. htaccess file
Today encountered a big problem, is reading excel in Chinese garbled big problem.
excel_class.php is a PHP import Excel tool, it can easily import data from Excel to PHP, but also easy to use PHP to import data into Excel. But today is not very
$Y = 2016;//Acquisition Year, example, the real environment from the front-end to obtain data $m = 8;//Get the month, example, the real environment from the front-end to obtain data $month = $Y. " -". $m//Current year $month _start = Strtotime
There are two ways to open and close the PHP error prompt, one in the php.ini configuration file. The other is the use of function Ini_set () and error_reporting () settings in PHP files.
1. Find the display_errors in php.ini, set the error prompt
1, the preceding has said the array as the stack and the queue when the deletion element operations, that is, in order to delete the rules. So, what if you need to remove an element from the middle of an array? We need the unset () function We're
Ali's OSS is not a directory of this concept, the so-called directory, is the file prefix to differentiate.
/** * Lists all directories and files within the bucket and obtains all files and directories according to the returned NextMarker loop call
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