This article introduces four ways to get web content using PHP, including XMLHTTP method, File_get_contents method, fopen method, curl method. Refer to a friend who needs it.1, use the XMLHTTP object, similar to the ActiveXObject object in ASP. Code:
This article introduces the implementation of the code in PHP to write Excel files, including the title and content. Refer to a friend who needs it.PHP writes Excel files, including headings. This is often used in daily development, such as a number
This article summarizes some of the PHP Session-related functions, there is a brief explanation, the need for friends, can be collected, in case of a rainy future. The PHP session function set, as follows: Session_cache_expire functions: Gets or
This article introduces, PHP implementation of the acquisition of Remote Web page content of several methods, including fopen, curl, the need for friends to refer to it.Share several snippets of PHP code to get the contents of a remote Web page. 1,
Include '. /.. /inc/auth.php ';
Include '. /public/base.php ';
Include '. /public/boonlist.php ';
The above is the code of the PDO connection database, we do it by ourselves.
Header (' Cache-control:no-cache, Must-revalidate ');
!--? php
/**
* Take out the reference All subdirectories of the directory
* edit:bbs.it-home.org
* 2013/10/9
*/
function Listdir ($dir) {
if ($handle = Opendir ($dir)) {
$
Class a{
Public Function __construct () {
Echo ' Got it. ';
}
}
Copy CodeThen, there is a index.php need to use this class A, the general wording:
Require ('
Echo GET_MAGIC_QUOTES_GPC (); Detection, Output 0
Echo
Tiny_mce_marker
post[' name ']; Jason ' name
Echo Addslashes (
Tiny_mce_marker
post[' name ']); Jason\ ' name
if (!GET_MAGIC_QUOTES_GPC ()
This article shares, PHP use phpexcel Import Database code, interested in studying Phpexcel friends to make a reference, or good.Phpexcel implement the import into the database, the code is as follows:
'; $objReader = Phpexcel_iofactory:
In this article, we introduce two functions, namely the Ord () function and the substr () function, which are not garbled in the Chinese string in PHP. Refer to a friend who needs it.In PHP programming Note: According to the UTF-8 encoding
This article describes the use of the mysql_fetch_array () function in PHP, which returns data query results as an array. Refer to a friend who needs it.PHP Data query result function: mysql_fetch_array () function. Returns the data query result as
This article introduces the two functions of variable function parameters in PHP, which are Func_num_args and Func_get_args functions, with the reference of a friend in need.First look at the Func_num_args function.Function: Returns the number of
This article describes the use of PHP code to get the MD5 sequence value of a directory, share a piece of code, for the needs of friends reference.PHP gets the MD5 sequence value of the directory. Code:
Read ())) { if ($entry! = '. ' && $
This article introduces PHP with recursive function to implement an infinite pole classification code, there is a need for friends reference learning under.PHP Infinite Pole Classification, recursive function implementation, the code is as follows:
In this article, the use of the function Ob_start () used in PHP for cache control is described below.In PHP, the Ob_start () function is used to open buffers, such as the header () function, if there is an output, including a carriage
Header (' content-type:text/html; charset = Utf-8 ');
Class Weather {
static $url = ' http://xml.weather.yahoo.com/forecastrss?u=c&w= ';
static $city = ' Beijing '; Default City Beijing It's important to note that cities want to fill
This article introduces a code for transcoding and judging the string encoding in PHP programming, and a friend in need can take a reference. In PHP, it is often necessary to implement GBK and UTF-8 encoding transformations, such as the Json_encode
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