In PHP, the file operation is relatively simple, the first is the file open, in PHP Open file will use the fopen function, the basic usage is:
fopen(string $filename, String $mode) $filename is the file name, $mode is the open method. The specific
AOP for PHP discussion----runkit runkit Extension is part of the pecl PHP extension that has been trying to implement Non-invasive AOP for the last two days. Runkit provides a set of functions that allow you to dynamically modify the definition of
One of the major issues to be concerned with in database usage is access rights, the exposure of user names and passwords. In the programming for the convenience, generally will use a db.inc file to save, for example:
User names and passwords are
Beginner PHP (5.6), has been suffering from the inability to debug operation, through the print log way to view the debug information, the total feeling is not very direct and convenient.
today through the ferry and the skeleton to find a more
Reason:
Windows nginx+php Environment and does not support concurrency. Solution:
1. When configuring Nginx Vhost, you need to run the same Web site to set different Fastcgi_pass port numbers
eg
server {
server_name t.memory-ferry;
# Other
Author: Zhu Maohai Category: FAQ release time: 2011-07-23 12:00ė778 views 611 article Catalog [hide] First, use PHP to execute script in crontab Two, use URL to execute script in crontab
Our PHP program sometimes needs to be executed periodically,
Array class_implements (mixed $class [, BOOL $autoload])-Returns all interfaces implemented by the specified class.
Array class_parents (mixed $class [, BOOL $autoload])-Returns the parent class of the specified class. int iterator_apply
1.echo is much faster than print. Two methods will print things on the page, but Echo does not return any values, and print returns 0 or 1 when it succeeds or fails.
2.include_once is more time-consuming than include. Because it needs to check if
* * one. Server-side Set header header allows Ajax to cross domain
**The code is as follows:
Allows the cross domain request
header ("Access-control-allow-origin:ityangs.net") initiated by Ityangs.net;
If you need to set up Cross-domain requests
Several traversal methods of arrays
/* Traversal of arrays**1. Looping through an array using a For statement* A. Other languages (only in this way)* b. In PHP this is not our preferred way* C. The array must be an indexed array, and the subscript
For example, an array like the following:
The code is as follows:
$users = Array (
' name ' => ' Tom ', ' Age ' =>)
, Array (' name ' => ' Anny ', ' age ' =>)
, array (' name ' => ' Jack ', ' age ' =>)
;
Want to be able to sort by age
Performance of PHP-GD
Before writing this chapter, run a PHP script first. As follows:
$SRC = "Test.jpg"; Image optimization used in the picture
$DST = "upload/gray.jpg";//Save result
$totalTime = 0;
$testCount = 32; Can only use such a small value,
The MySQL database query class previously written in "PHP" using PHP's constructors and destructors to write MySQL database queries is not perfect, the idea of using the "Java" single example mode (click Open link) to make a single example of this
PHP Form Processing
PHP Hyper-Global variables $_get and $_post are used to collect form data (Form-data). $_get is an array of variables passed through the URL parameter to the current script. $_post is an array of variables passed through HTTP
Function: __autoload () future will be discarded (spl_autoload_register () substitution)
Function: When the class name error, the __autoload () use reason: When writing code will refer to a lot of require or include, this will cause code confusion
Taking www.verycd.com as an example
Login wuming88888888 account in Firefox browser for sending party
Login to wuming1990 account as receiver in Chrome browser
Analyze the sender's form
Analyze submit page source code post data [PHP] view plain
Install configuration php-fpm to build a nginx+php production environment
Nginx itself can not handle PHP, it is just a Web server, when the request is received, if it is a PHP request, then sent to the PHP interpreter processing, and the results
Author: zccst
Installed extensions include: SOAP, pdo_mysql, curl, etc.
1, install Curl
Cd/lamp/php-5.2.6/ext/curl
#/usr/local/php/bin/phpize#./configure--with-php-config=/usr/local/php/bin/php-config# make# make InstallHere you will be prompted
Author: zccst
1, Time zone problem
Warning:phpinfo () [Function.phpinfo]: It is isn't safe to rely on the system ' s timezone settings. You are are *required* to use the Date.timezone setting or the Date_default_timezone_set () function. In case
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