During the development of an sns website using elgg as the basis in the past two days, the application of the policy mode was first encountered. To enable this function, the participant (owner) will send the promotional website address link to a
Upload the file to the website. The shortcut cut. php prompts you to download a file named Zhangchu website. urll. saving it locally is a shortcut! Create a new PHP document: just remember the name, for example, export cut. php.
Content in the PHP
The final order confirmation information in the shopping process of ecshop. The information about the user's order distribution address does not include the information of the province, city, and district selected by the user. Ecshop
Add the
After carefully analyzing the infinite classification of ecshop, we found that it is not difficult to understand its algorithms. There are examples to help you understand them. Ecshop
The code is as follows:
Function cat_options ($ spec_cat_id, $
PHP uses regular expressions to extract the output code of the image address loop in the database content.
The code is as follows:
/*
1 (? S) indicates Pattern. DOTALL, that is, match the line feed, allowing the img to appear in multiple lines
2
Php can be automatically loaded in two ways. For more information, see. Php supports two automatic loading methods.
The first scheme uses _ autoload, which is relatively simple and weak.
But there is a problem that cannot be solved, that is, to
The common problem is that, after BOM encoding is used, PHP script execution errors, or the error Themarkupinthedocumentfollowingtherootelementmustbewell-formed will be reported if fileStream is used to read and convert to XML ..
I. INTRODUCTION
PHP online decompress Zip file function code. For more information, see.
The code is as follows:
/**********************
* @ File-path to zip file
* @ Destination-destination directory for unzipped files
*/
Function unzip_file ($ file, $
Creating image thumbnails takes a long time. This code helps you understand the thumbnails logic.
The code is as follows:
/**********************
* @ Filename-path to the image
* @ Tmpname-temporary path to thumbnail
* @ Xmax-max width
* @ Ymax-max
In fact, php Video Playback code is basically supported in common video formats. it uses regular expressions to match File extensions and calls the corresponding online player code based on different file extensions. Some simple video playing
PHP creates a tag cloud function code. use this function to create a tag cloud.
The code is as follows:
Function getCloud ($ data = array (), $ minFontSize = 12, $ maxFontSize = 30)
{
$ MinimumCount = min (array_values ($ data ));
$ MaximumCount =
Array_flip () returns an inverted array. for example, the key name in trans is changed to a value, and the value in trans is changed to a key name. Description
Array array_flip (array trans)
Array_flip () returns an inverted array. for example,
For many times, we will not use phpftp function file upload, but some advanced WEB applications will use ftp functions. for example, if I want to transfer uploaded images to server B, data is stored on server A. normal PHP files cannot be uploaded,
In fact, the simple point is to use this variable $ _ SERVER [for example, the first request for a file is from 0 to 999 bytes, the second request is from 1000 to 1999 bytes, and so on, each request for 1000 bytes of content, then, the program uses
Add, delete, query, and sort php arrays. For more information, see.
Detailed descriptions of data addition, deletion, query, and sorting
Add an array (add the first and last Data Records (not Limited) and add data anywhere in the middle ).
2 ~
PHP transaction processing data implementation code. For more information, see.
The code is as follows:
Public function insertUser ($ userArray ){
Foreach ($ userArray as $ key => $ value ){
@ $ Field. = "$ key ,";
@ $ Content. = "'$ value ',";
Wangguan home will provide a message source code for php + access. for details, refer. I am familiar with phpaccess operations.
The code is as follows:
$ Conn = new com ("ADODB. Connection ");
$ Connstr = "DRIVER = {Microsoft Access Driver (*. mdb)}
Php deletes records and the implementation code of deleting image files at the same time. For more information, see.
The code is as follows:
$ Cn = mysql_connect ('127. 0.0.1 ', 'root', 'root') or die ('database connect fail ');
Mysql_select_db
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