Home > Backend Development > PHP Tutorial > php向数据库中安插ip地址,有必要在插入之前将ip地址整形化么?为了以后方便比对

php向数据库中安插ip地址,有必要在插入之前将ip地址整形化么?为了以后方便比对

WBOY
Release: 2016-06-13 13:06:03
Original
869 people have browsed it

php向数据库中插入ip地址,有必要在插入之前将ip地址整形化么?为了以后方便比对。
如题!

------解决方案--------------------
既然是 为了以后方便比对 那么当然需要
php 提供了 ip2long 和 long2ip
mysql 提供了 INET_ATON 和 INET_NTOA

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template