If you simply get the current access to your page's domain name, we only need to use PHP function Http_host can be done, if it is to extract the URL root domain name is required regular, below to look at a few concrete examples.
It is very simple
This title is not very strict, it should be said that you can use the dot number of the cookie name, but will be converted, you name a cookie:
$_cookie[' my.name '] = 1;
You can't actually find this value in a cookie by ' my.name ', Only ' my_name
In general PHP instanceof and is_a () function is the same, the difference is due to the different versions of PHP, some PHP version of the is_a () to give a detailed analysis of the following.
Both the instanceof operator and the Is_a () method
This article mainly introduces the PHP implementation of one-dimensional array of two-dimensional array of methods, example analysis of the PHP operation of the array of skills, with a certain reference value, the need for friends can refer to the
To use PHP to protect another PHP process (the Apache module is running, and nginx, etc.)
A.php to guard b.php.
Gets the ID of the current process through the getmypid () function in b.php, writes the ID to the C.pid file, and deletes or clears
This article mainly introduces the PHP curl to get the return value of the method, the need for friends can refer to the
There is a parameter Curlopt_returntransfer in the curl:
The code is as follows: curl_setopt ($ch, Curlopt_returntransfer, 0);
This article mainly introduces PHP to judge the normal access and external access methods, the need for friends can refer to thePHP to determine the normal access and external access code is as follows: ">
This article mainly introduces the PHP time to perform task Setup method, very simple, there is a need for small partners under the reference.
Today, a buddy of mine asked me this question. He has an IIS server that is scheduled to execute a
Premise
Need to determine whether remote URLs are valid, remote URLs include remote pictures, web pages, videos, etc.
Solution:
Using PHP to resolve
Use the File_get_contents function, but the pros and cons if the URL is not accessible, a
This article mainly introduces PHP to get the title of the Web page 3 implementation methods, respectively, using curl, file () function, file_get_contents implementation, the need for friends can refer to the following First, the recommended
PHP Gets the search keyword problem
On the internet to find a piece of code to achieve search keyword, testing a key word can not be, is this code is invalid, or there is a bug?
Search Source keyword
function Get_keyword ($url, $kw _start)
{
Do site classes sometimes get an activity or something to allow users to participate, not only to attract users to register, but also improve the user activity of the site. At the same time to participate in the user will get a certain prize,
Definitions and usage
The Array_diff_key () function returns an array that includes all the keys in the array being compared, but not in any other parameter array.
Grammar
Array_diff_key (Array1,array2,array3 ...)
Parameters
Describe
Array1
In the work, often encountered need to get the file extension, here I will summarize the following several methods. (Welcome to criticize)
Method One
function Getfileextend_1 ($fileName) {
$retval = "";
$pt =strtpos ($fileName, ".");
if
php uses regular expressions to extract the characters descriptor in a string with angle brackets <>, parentheses (), brackets [], curly braces {}, and a friend in need can refer to the following Code as follows: $str = "Hello )/I", $str,
Recent research on the development of PHP technology, found that PHP has a lot of ASP does not have the outstanding features, can complete some previously unable to complete the function, such as dynamically generated HTML static page, to reduce the
Today, a friend consulted the fire php random number problem, this is the basic problem of PHP, you can refer to the fire provided by the PHP manual, due to the time relationship, small knitting also lazy write, found some examples on the Internet,
curl is really a good tool, not only in PHP but also in other operating systems, is a very useful. But if you have some parameters that are not good enough, you may not get the results you want. In general, when we use CURL to submit POST data, we
This article mainly introduces the PHP traversal folder of all the files and subfolders examples, here are two methods, the need for friends can refer to the following Traverse the directory and the result is stored in an array. Support PHP4 and
PHP session the same client request when the server sessions do not end, the next request cannot be done!
For example, the following code:
Client
#content { width:100%; height:100%; Text-align:center; }
Server
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