How PHP crawls remote images and saves them as an implementation
Here is the source code, and its related explanations
URL is the full picture address of the remote, cannot be empty, $filename is saved as the picture name
By default, the image
Send mail using Phpmailer
Phpmailer's official website: http://phpmailer.worxware.com/
Phpmailer GitHub Download Address: Https://github.com/Synchro/PHPMailer
To use the method, see the code listing:
ISSMTP (); Set mail using
PHP removes URL URLs with Phpsessid configuration method, Urlphpsessid
This situation is mainly in the Linux platform to appear, mainly due to the problem of session.use_trans_sid configuration in php.ini.
Set session.use_trans_sid = 1 in php.ini
PHP Multi-File Upload class
PHP Multi-File Upload class
/*
Multi-File Upload class
Modified: Linvo 2008-2-15
*/
Class more_file_upload{
Const file_path= '. /upfileclass/uploadfile/';
var File_type;
var File_type_array;
var File_type_real_array;
var
PHP Methods for preventing page caching
For example, I have 3 pages, 1. Shopping Cart 2. Order Address and payment Method 3. When the Order Generation 2--3 is displayed, the order data is inserted, the order information is generated, and the items
How to learn PHP Array_diff_key
Definition and usage
The Array_diff_key () function returns an array that contains all the keys in the array being compared, but not in any other parameter array.
Grammar
Array_diff_key (Array1,array2,array3
The PHP framework YII framework uses the YIIC command to prompt that "php.exe" is not an internal or external command, YIIYIIC
Solution Solutions
Yii/framework/yiic.bat, modifyIf "%php_command%" = = "" Set Php_command=php.exeIf "%php_command%" = = "
How to learn PHP Array_diff_ukey ()
Definition and usage
Array_diff_ukey () returns an array that contains all the values that appear in the array1 but do not appear in any of the other parameter array's key names. Note that the association
PHP custom page-out functions
PHP custom page-out functions
Every time you write a list of the nature of the page, almost all have to write a section of the program. Recently, Yang small finally resolved to once and for all-customize a paging
Project Integration Discuz Ucenter, integrated Discuzucenter
Although individuals very dislike discuz, but no way, the market is power, especially for the integration of DISCUZ forum friends, if you do not want to use two sets of systems,
PHP json_encode processing GBK and gb2312 Chinese garbled problem solution,
This paper describes the solution of Json_encode processing GBK and gb2312 in PHP, and the method is as follows:
1.json_encode () Chinese returns null for Chinese in gbk/gb2
Comparison of performance efficiency of file_get_contents to curl in PHP
This article shares some of the comparisons in PHP about the performance efficiency of file_get_contents in curl. The content of the article is organized from the network, if
thinkphp The custom configuration file,
The thinkphp system has a custom configuration file (located under the system directory, conf\convention.php), which is configured by default for most of the used parameters. This article makes a comment on
PHP Read file garbled solution method
PHP 5 Stream read function as if the default encoding is UTF-8, previously in PHP 4 directly file_get_contents () read gb2312 encoding normal, to 5 is garbled. The solution on the net said after crawling with
Compatible with IE6 browser php download file code sharing,
PS: This code in the win system run without problems, Maple Brother Pro test available. If you're using Linux or any other system, you have to do it yourself.
$filename = "./". $_request['
PHP functions commonly used in project development
Date operation
To facilitate storage, comparison, and delivery, we often need to use the Strtotime () function to convert dates into Unix timestamps, and use the date () function to convert dates
thinkphp Multi-Table query-If field A is the same, add field B
In a project, you need to query the USER_ID field in the table tr_product, and if the user_id is the same, add the corresponding Money field to the database as follows:
Implementation
Yii debugging SQL is a common method of debug SQL
YII debugging SQL mainly has the following methods:
First, the system comes with debugging:
First index.php Open debug mode:
Remove the following lines when in production mode defined (' Yii_debug ')
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