Unified entry class of input data
Http://blog.qita.in /? Posting = 494
/**
* Obtain unified input entries
*/
Class cls_request
{
Private $ getdata; // Store get data
Private $ postdata; // Store post
A simple and practical HTML parsing class recently collected and written
$ Xp = new xf_HtmlDom (); $ xp-> loadHtml ('http: // dealer.bitauto.com/100040078/cars.html'); $ rows = $ xp-> find ('dl/dd/', 0)-> innertext; print_r ($ rows );
Thunder, tornado, Express chain conversion
Dedicated link for ThunderAfter adding the AA tail to the normal header, and then adding ZZ to the final header encoded with base64, add thunder ://
Tornado dedicated
The array is converted into a string and restored back to the array as is.
$ Str = array
(
'A' => 'A ',
'B' => 'BB ',
'C' => array
(
0 => 1,
1 => 2,
2 => 34,
SMS platform PHP code
$ Flag = 0;// Data to be post$ Argv = array ('SN '=> 'sdk-BBX-010-XXXXX ','Pwd' => 'xxxxxx ','Mobile' => '123 ','Content' => 'Hello, test SMS');// Construct the string to postForeach ($ argv as $ key => $ value
Function for traversing all files and subfolders in a folder
The legend is that Sina php engineers wrote questions
Function my_dir ($ dir ){
$ Files = array ();
If (@ $ handle = opendir ($ dir) {// note that you
Code written by php about the crawler record of static pages
$ Useragent = addslashes (strtolower ($ _ SERVER ['http _ USER_AGENT ']);
If (strpos ($ useragent, 'googlebot ')! = False) {$ bot = 'Google ';}
Function applications that convert variables to arrays in php
// Specify the variable
$ City = "Heze ";
$ Province = "Shandong province ";
$ Project = "PHP Program ";
$ Location_vars =
Three methods for converting strings to json format in js
Function strToJson (str ){
Var json = eval_r ('+ str + ')');
Return json;
}?>
Do not forget the parentheses on both sides of str. Method 2:
Example of using _ set and _ get in PHP
Class Person {
Function _ get ($ property ){
$ Method = "get {$ property }";
If (method_exists ($ this, $ method )){
Return $ this-> $ method ();
Some knowledge about phpize
A little bit of phpize knowledge, both chinese and english. if you need it, take a look. Compiling shared PECL extensions with phpizeA little bit of phpize knowledge, both chinese and english. if you need it,
There cannot be any output before header and session_start in php
In php, the header and session_start cannot have any output because: in http transmission text, the order of header and content must be: header before content isIn php,
Several methods for connecting php to different databases
$ Conn = new Com ("ADODB. Connection"); // instantiate a Connection object
$ Connstr = "provider = sqloledb; datasource =.; uid = sa; pwd = 123456;
Understand the implementation principles of php scheduled tasks
Ignore_user_abort (); // The PHP script can be executed even if the Client is disconnected (such as the browser is disabled.
Set_time_limit (0); //
Introduction to programmer's salary and work experience
Many people will ask about the salary and years of working experience of PHP/java programmers, whether in the comments on the employment forum or as a guiding article circulating on
Analysis on the applicability of global variables in php
$ A = 1;
Include 'B. Inc ';
?>
The variable $ a will take effect in the included file B. inc. However, in user-defined functions, a local
A recursive function written by php to generate a drop-down list for unlimited classification
/*------------------*/
//-Recursively implement the infinite classification to generate the drop-down list function
How to implement plug-in mechanism in php
This article describes my understanding of the plug-in mechanism and its implementation in PHP. this solution is only one of the implementation methods of the plug-in mechanism and is for reference
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