All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
PHP实例:将IP最后一位替换为星号_[PHP教程]

Writer: 归海一刀 Article type: Programming skills(编程技巧) Time: 2014/2/17 7:33:06 Browse times: 433 Comment times: 0

PHP实例:将IP最后一位替换为星号_[PHP教程]


Head photo

Go homepage
Upload pictures
Write articles

PHP实例:将IP最后一位替换为星号_[PHP教程]

将IP最后一位替换为星号 代码如下:

str = '1.1.1.1';

reg = '/((?:\d+\.){3})\d+/';

echo preg_replace(reg, "\\1*", str);
?>





There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.