Ask the experts if they want to filter out the first decimal point? The obtained URL may be in the following format: baidu.com.baidu.com & nbsp; $ name = substr ($ name, 1); the result obtained by filtering .baidu.com is correct, however, if you encounter a problem similar to baidu.com, you can filter it to aidu.com. if you want to filter the first decimal point, ask the experts for the code you want to use?
The URL format may be as follows:
Baidu.com
.Baidu.com
Use
$ Name = substr ($ name, 1 );
The result obtained by filtering .baidu.com is correct, but if you encounter a problem similar to baidu.com, it will be filtered into aidu.com. please ask what code can be used to filter vertices a bit earlier. if there are no vertices, it will not be filtered?
Let:
Baidu.com or .baidu.com are all baidu.com.
------ Solution --------------------
PHP code
[User: root Time: 11: 47: 47 Path:/home/liangdong/php] $ php preg. php baidu.com [User: root Time: 11: 47: 48 Path:/home/liangdong/php] $ cat preg. php