Php login function code example of php simple login function
/**
* Php login functions
* Edit: bbs.it-home.org
*/
// Remove insecure html code for php and mysql.
Function safestrip ($ string )
Php code for converting numbers into Chinese characters in case
// Chinese_money.PHP
// Changing Arab Money Num to Chinese Money Num
/*
Functions List:
Chinese_Money_Max ()
Small example of PHP traversing files and folders
/**
* Traverse files and folders
* Edit: bbs.it-home.org
*
*/
Function list_dir ($ dirpath ){
// Determine whether the character at the
Small example of PHP date processing mysql Query by date and time
// Php date processing
Date_default_timezone_set ('prc'); // Default time zone
Echo "today:", date ("Y-m-d", time ()),"";
Echo "today:",
Php deletes a specified file and folder
// Delete all file functions in the specified directory (folder)
Function delfile ($ dir ){
If (is_dir ($ dir )){
$ Dh = opendir ($ dir); // open the Directory
Small example of php output buffer
// Enable Buffering
Ob_start ();
// Output stuff (probably not this simple, might be custom CMS functions...
Echo 'Print to the screen !!! ';
How to solve the problem of automatically adding escape characters when passing parameters in PHP form POST
This article introduces how to solve the problem of automatically escaping characters when passing parameters through form post
Implementation of pseudo-static phpurl
// Convert a url to a static url
Function url_rewrite ($ file, $ params = array (), $ html = "", $ rewrite = true ){
If ($ rewrite) {// do not rewrite
PHP class for reading configuration files. php reads ini, yaml, and xml configuration file information.
/**
* Function: Read the configuration file.
* Edit: bbs.it-home.org
* Last modification:
*/
Example of constant usage in php class
Class Employee {
// Define a constant
Const AVAILABLE = 0;
Const OUT_OF_STOCK = 1;
Public $ status;
}
Print Employee: AVAILABLE;
?>
Example of importing a csv file into a MySql database using php
/**
* Import a csv file to the mysql database
* Edit: bbs.it-home.org
*/
$ Databasehost = "localhost ";
$ Databasename =
Small example of abstract classes in php5
/**
* Define and use php abstract classes
* Edit: bbs.it-home.org
*/
Abstract class Number {
Private $ value;
Abstract public function
Php statistics function for getting folder information
// Collect information about folders
// Count the number of directories
// Format the size of the output directory. unit: Bytes, KB, MB, and GB.
Php color value conversion php converts hexadecimal numbers and color values
/**
* Color value and hexadecimal number conversion
* Edit: WWW. JBXUE. COM
*/
Function toHex ($ N ){
If ($
Small example of generating xls files in php
Include '../inc/auth. php ';
Include '../public/Base. php ';
Include '../public/BoonList. php ';
// The above is the code for connecting pdo to the
Two methods for adding CURL Extension Library in PHP
Wget http://curl.haxx.se/download/curl-7.19.6.tar.gz
Tar-zxvf curl-7.19.6.tar.gz
Cd curl-7.19.6
./Configure -- prefix =/usr/local/curl
Make
Make
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