PHP-made port sniffer--you can specify the website and port
and return the sniff results.
function Http_request ($server, $port) {
$data = "";
$query = "head/http/1.0";
$fp = Fsockopen ($server, $port);
if ($fp) {
Fputs ($FP, $query. " Rnn ");
while
From a good message to get the MySQL database operation class, beginners PHP friends can refer to the next
Copy the Code code as follows:
Class mysql{var $querynum = 0;Function Connect ($dbhost, $dbuser, $DBPW, $dbname = ', $dbcharset = ') {if (!
Convert a DateTime object to a friendly time display using DateInterval in PHP 5.x
/**
* Friendly Date and time
*
* Date Time @param datetime $datetime
* @param int $size Precise in-place number
* @throws
/**
* Get city name based on IP address pure IP database
* edit:bbs.it-home.org
*/
function Convertip ($IP) {
IP Data File path
$dat _path = ' QQWry.Dat ';
Check IP Address
if (!filter_var ($ip,
This article introduces the use of the relevant functions of special character escaping in PHP, and the method of handling special characters in PHP, and the reference of the friends who need them.MySQL and PHP come with a lot of functions to handle
Article Source: phpbuilder.com
Original Author: Luis Argerich
Translation: Erquan
Erquan Note: I have not had time to experience the PHP5, just translated a foreigner's article.
The following are translated by Erquan, the 1th time to do these things
COM functions in PHP4 (Windows version) these days have been writing Excel into MySQL, found an article, search the PHPX forum, without this post, put it reprint as follows:
COM functions in the PHP4 (Windows version)
Introduced
COM functions
PHP has a number of easy-to-use functions to display and process dates.
To display a date or time in a particular format, you can use the date () function. It has two parameters: how to display the format of a date and the timestamp that represents
Author: Armel Fauveau
Original address: Http://www.phpbuilder.net/columns/armel20010427.php3
PHP can open remote or local server sockets! Here is a simple example of using a socket: Connect to Usenet news server, communicate with the server, and
CakePHP is a system developed by the United States team, we are looking for cakephp data to Google search for accurate information! Or go to the official website to check! Official site is www.cakephp.org!
First of all, let's talk about why we use
PHP gets the current script URL (only path)
Copy CodeThe code is as follows:
function Getcururl ()
{
if (!empty ($_server["Request_uri"))
{
$scrtName = $_server["Request_uri"];
$nowurl = $scrtName;
}
Else
{
$scrtName = $_server["Php_self"];
if
First clean up the idea first, ~ ~
First: You need to upload the file to the server.
Then: Read the Excel data column display
Then: Let the user select the corresponding relationship of the field
Then: Submit the data, read the correspondence of the
The full format of printf format control:
%-0 M.N L or H format characters
The following describes the items that comprise the format description:
①%: Represents the starting symbol for the format description, which is indispensable.
②-:
JS in the encodeURIComponent function to the Chinese code, how to use PHP decoding??
Prerequisite: The Chinese before encoding may be gbk,gb2312,utf-8 and so on.
Copy CodeThe code is as follows:
UrlDecode ()
Iconv ()
In JS using
Copy CodeThe code is as follows:
/**
* A function of converting a digital amount into a Chinese capital amount
*string Int $num lowercase number or lowercase string to convert
*return Capital Letters
* Decimal place is two digits
**/
function
The basic syntax for the PHP function split () is: Array split (String $pattern, string $string [, int $limit]). We give you two examples to illustrate how this function is used.
For beginners, mastering the usage of common functions in PHP is the
In the Internet to find a lot of ways, and eventually solved the
In fact, the simplest way is to add
Label
You can also use program control
Copy CodeThe code is as follows:
Header
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