Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在wordpress中显示用户发布的IP地址。我用过$_SERVER['REMOTE_ADDR'];这个,但所有的IP地址都是一样的。对此有任何疑问吗?
$_SERVER['REMOTE_ADDR'];
我通过在 post meta 字段中保存用户 IP 地址来做到这一点。
$post_ip=$_SERVER['REMOTE_ADDR']; add_post_meta( $post_id, 'post_ip', $post_ip );