[PHP] a collection of frequently used practical functions is about to learn php. I found that many functions need to be used and can be written by myself, so I found common php functions, from various major php systems, php practical functions are
The code for sending mails using SMTP in php the latest project needs to use SMTP to send mails. the previous library class does not exist and does not like to install pear or use the net/smtp class of pear, it is too complicated. The core is
Fgets and fputs, fread and fwrite, fscanf and fprintf fgets and fputs, fread and fwrite, fscanf and fprintf
String read/write functions fgets and fputs1. the fgets function of the string reading function reads a string from a specified file to a
PhpFPDF class library application implementation code
The code is as follows:
Require ('Chinese. php ');Class PDF extends pai_chinese{Function Header () // Set the Header{$ This-> SetFont ('GB', '', 10 );$ This-> Write (10, 'XX company product
All PHP file packages remove all comments in one PHP file remove extra spaces keep output pure PHP (that is, no additional processing steps are required to parse the file) usage: (run on the command line)
The code is as follows:
Php compactor. php
Favorite common PHP functions are recommended. Save the following content:
The code is as follows:
Function GetIP () {// obtain the IP addressIf ($ _ SERVER ["HTTP_X_FORWARDED_FOR"])$ Ip = $ _ SERVER ["HTTP_X_FORWARDED_FOR"];Else if ($ _ SERVER
If you are not planning to create an application using the OO principle, use the object-oriented (OO) language features of PHP, these seven habits will help you begin to convert between process programming and OO programming. In the early days of
Use regular expressions to match dede tags. For more information about template tags like dedecms, see dedecms template tags. Html code
The code is as follows:
{T: arc row = '10 '}{T: field. title /}{T: list row = '5 '}{T: field. title /}
MVC is the abbreviation of Model, View, and Controller. the purpose of MVC mode in PHP is to achieve the division of functions of the Web system, in general, business logic processing is separated from the user interface view. It makes the
Using a Socket to send an email using a Socket to send an email in several PHP homepage spaces applied by the author does not provide the mail function much. It is always done after the mail () function is called.
No more. However, emails play an
Phpmyadmin is the client software used to remotely connect to the MySQL database. you can follow these steps:
To configure the phpmyadmin software:
Download the phpmyadmin.rar file to your local computer;
Decompress the file using winrar to
Online storage has a straight-chain function, but it requires money. I have a Baidu network disk, but Baidu's external network disk chain cannot be directly used in the web page. Baidu can also have this function one day.First Code: less
This article provides a detailed analysis of CentOS6.2 using yum to install LAMP and phpMyadmin. For more information, see how to use YUM to configure and install the LAMP environment under CentOs6.2, some brothers also like to use the compiled
This article provides a detailed analysis of php_screw1.5: php encryption: Installation and Use. For more information, see the php file stored on the server in text format, it is easy for others to read the source code. to protect the source code,
This article provides a detailed analysis of the use of the fopen function in php. For more information, see section 1. resource fopen (string $ filename, string $ mode [, bool $ use_include_path [, resource $ zcontext])
Function:Fopen () binds the
PHP5.5.0 has been released recently and brings a complete list of new features and functions. One of the new APIs is PasswordHashingAPI. it contains four functions: password_get_info (), password_hash (), password_needs_rehash (), and
The input value form submits parameter filtering to effectively prevent SQL injection or illegal attacks. The following describes some good methods, if you are interested, do not miss the input value/form submission parameter filtering to
This article mainly introduces a set of PHP reversible encryption and decryption algorithm instance code. if you need it, you can refer to the md5, sha1, and other methods for most password encryption. This can effectively prevent data leaks, but
This article describes how to use codeigniter to upload multiple files. For more information, see
The code is as follows:
/*** Multi-Upload** Extends CodeIgniters native Upload class to add support for multiple* Uploads.** @ Package CodeIgniter*
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