This article is an example of how PHP determines whether to connect to the network. Share to everyone for your reference. The implementation methods are as follows:
First write a function
?
1 2 3 4 5 6 7 8 9
function Varify_url
/*
Function written by Nelson Neoh @3/2004.
For the those who wants to utilize this code, please don't remove this remark.
If you have do any enhancement to this code, please post the copy at Http://www.dev-club.com PHP board. Thank you.
Function
Very simple, for files to share in the Web1 Execute *nix command to obtain this catalog file2 Build Download link3 Support Chinese name, the name can contain spaces4 source code Please save as UTF-8 encoding5 assume that the share path is
Functions are such a powerful source of PHP, but many PHP functions are not fully exploited. Here, we give you a brief description of 10 unusual, but very useful, functions.
1. Sys_getloadavg ()
SYS_GETLOADAVT () can obtain the system load condition.
Copy CodeThe code is as follows:
$setting = Array (
Black probability
0 => 0.99,
White probability
1 => 0.01,
);
Requires the GD Library
Header ("Content-type:image/png");
$im = Imagecreatetruecolor (256, 256) or Die ("Cannot Initialize new GD image
Author: Albert
When PHP is running as an Apache module, the Apache security takes the lead, so if configured correctly, PHP should be a very secure environment, but if PHP is running in CGI, it's not so safe.
The actions mentioned in this article
PHP receives more than one checkbox with the same name the information is not automatically converted to an array as an ASP, which brings some inconvenience to use. But there is a solution, is to use JavaScript to do the preprocessing.
Multiple
use a regular expression to extract the link address , as shown in the following code
The following is a reference fragment: Arisisi source Download Channel Web Effects Demo Center Js.alixi xi.com Arisisi. com Webmaster Tools
You can use PHP to generate Excel files. Teaman translation
----------------------------
Excel functions
----------------------------
Save the following code as excel.php and include it in the page
and then call
1. Call Xlsbof ()
2. Write some
php 4.3 Adds a magic constant __class__ to get the current CLASS name. But in the following code, it's not work.
Class A {function Showclass () {Echo __class__;}}Class B extends A {}A::showclass ();B::showclass ();
This code will play two aces
Document Seven: globres.tml
below results from the site provided by the Domain name query system, you can order the domain name is not registered or query the registered domain name details. script_name Click here return to the domain name query
This tutorial belongs to the original download, reproduced please indicate from the Web page teaching networkDescription: Using PHP to send e-mail is relatively simple! You can take a look at the complete code below.
1. Copy the following code into
1. When you add records in the background, the target HTML page is generated directly, and the foreground call connection directly points to the generated HTML page. The advantage of this approach is that the program is most efficient.
Server load
Name of the tag--in the "the" above, this is the tag STORY, andBelow that byline. You want byline_author. You want the "the". TheThe ' is ' index [0] in the second part of the two-dimensional array.Even if there is only *one* byline author, it's
PHP is a scripting language that creates dynamic Web sites based on the server side, and you can use PHP and HTML to build your home page. When a visitor opens the home page, the server executes the PHP command and sends the execution results to the
1, ask: Why appears "APACHE." Exe:cannot determine local host name. "?
For:
Because the Windows version of Apache does not specify servername by default, the Run-time error occurs.
The solution is to modify the httpd.conf in the Conf directory
User-acceptable language information, placed in $_server[' Http_accept_language ',Variable information is similar to "ZH-CN", if it is a multilingual column, is similar to "zh-cn,en;q=0.8,ko;q=0.5,zh-tw;q=0.3"The following questions can be
echo "Hello, world!";?>
Run Result:
Hello, world!.
The variable is marked "$". You can also put the "Hello, world!" above Write as the following code:
$message = "Hello, world!";Echo $message;?>
String concatenation is the use of the "." (an English
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