Every e-commerce site now has one or more types of offers/discounts/coupons system to share with you how to generate a unique promo/discount code in PHP. The main is to implement a promo code system, can be used to track users from certain sources,
Php+mysql+ajax implementation Baidu Search drop-down prompt box mainly has 3 files three files in the same directory as
Here are three files of the code to import the SQL file into the MySQL database to modify the database password for their own
Eval
Converts a value into a string.
Syntax: void eval (string code_str);
return value: None
Function type: Data processing
Content Description
This function can substitute the value of a variable in a string, and is typically used to manipulate
Treetable can also display hierarchical architecture in an infinite hierarchy by combining row and column merging of cells.
1. Build an array of id/pid/name and later dynamic data that can be generated from the database. Tree algorithm, click
Copy
Lostwolf wrote it.
It's not Webshell, it's just a webshell-free tool.
Do not use the original Webshell
Kill Phpwebshell Only
The tool runs in CLI mode!
If there is no way to break the file content filtering can try to use this tool to avoid killing
Introduced
Have you ever heard of AOP (Aspect oriented programming)? Although there seems to be no excessive use in PHP, AOP is widely used in enterprise-level development. I'll take this article to introduce you to the AOP aspects of PHP.
This
I. Singleton mode (Singleton)If the application contains and contains only one object at a time, then the object is a single instance. Used to override global variables.
Copy CodeThe code is as follows:
Require_once ("db.php");
Class
php5.x version, to add PHP extension php_mcrypt.
PHP Version:
Copy CodeThe code is as follows:Class Std3des{Private $key = "";Private $iv = "";/*** Construct, pass two key and IV that have been base64_encode** @param string $key* @param string $iv*/
PHP Development will certainly encounter the need to import Excel file content into the database, Php-excel-reader is a class that reads Excel, it is easy to use it to read Excel files very convenient.
Php-excel-reader Download Address:
Write the required function, URL complement function, can also be called FormatUrl.
Write this function is to develop the collection program, the collection of articles will often encounter the page path is "relative path" or "absolute root path" is
In the development process may encounter unable to obtain the MSSQL stored procedures output parameters, many friends do not know what to do, this article will be detailed introduction of PHP to get MSSQL of the stored procedure output parameters of
The registration procedure unifies the single entrance, the core judgment is the Checkip place, only needs to make a game_id judgment in the non-real-name authentication template procedure. Because too sure, anxious to get off the psychology,
Copy CodeThe code is as follows:
$link = Array (
' Baidu, http://www.baidu.com/',
' Server software, http://s.jb51.net/',
' Script house, http://www.jb51.net/',
);
$STR = ' Search Server Software in Baidu to provide software to the Scripting House
1. Related to MySQL
Mysql_connect
Establish a connection to the MySQL server
Grammar
Resource mysql_connect (String server[,string usingname[,string password[, BOOL New_link[,int Client_flags]]])
eg
Copy CodeThe code is as follows:
$DB _host =
PHP Read File
Case One
Copy CodeThe code is as follows:
$file = ' jb51.net.php ';
This case does not support remote
$fso = fopen ($file, ' R ');
echo $data = Fread ($fso, FileSize ($file));
Fclose ($FSO);
?>
fopen () binds the name resource
But yesterday when reading a picture of the problem, and later found that the URL with the Chinese characters.
For example, the following scenario:
Copy CodeThe code is as follows:
$files = fopen (' http://www.website.com/my pp.jpg ', ' RB ');
Eval Definition and usage
The eval () function calculates the string according to the PHP code.
The string must be a valid PHP code and must end with a semicolon.
If no return statement is called in the code string, NULL is returned. If there is a
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