xxx@Luna ~
% nslookup www.digitalocean.com 180.97.80.5
Server: 180.97.80.5
Address: 180.97.80.5#53
** server can't find www.digitalocean.com: SERVFAIL
xxx@Luna ~
% nslookup www.digitalocean.com 168.95.1.1
Server: 168.95.1.1
Address: 168.95.1.1#53
Non-authoritative answer:
www.digitalocean.com canonical name = cf-ssl40656-protected-www.digitalocean.com.
Name: cf-ssl40656-protected-www.digitalocean.com
Address: 198.41.188.27
Name: cf-ssl40656-protected-www.digitalocean.com
Address: 198.41.189.27
xxx@Luna ~
% nslookup www.digitalocean.com 192.168.199.1
connection timed outno servers could be reached
xxx@Luna ~
% nslookup www.digitalocean.com 192.168.199.197
Server: 192.168.199.197
Address: 192.168.199.197#53
Non-authoritative answer:
www.digitalocean.com canonical name = cf-ssl40656-protected-www.digitalocean.com.
Name: cf-ssl40656-protected-www.digitalocean.com
Address: 198.41.188.27
Name: cf-ssl40656-protected-www.digitalocean.com
Address: 198.41.189.27
先判断下是否登录,然后获取当前用户对象,然后获取当前用户对象的信息,需要哪些用哪些:1
2
3
4
5
6
7
8
9
10
11
12
13
14
if(is_user_logged_in()){
$current_user = wp_get_current_user()
/**
* @example Safe usage: $current_user = wp_get_current_user()
* if ( !($current_user instanceof WP_User) )
* return
*/
echo 'Username: ' . $current_user->user_login . '<br />'
echo 'User email: ' . $current_user->user_email . '<br />'
echo 'User first name: ' . $current_user->user_firstname . '<br />'
echo 'User last name: ' . $current_user->user_lastname . '<br />'
echo 'User display name: ' . $current_user->display_name . '<br />'
echo 'User ID: ' . $current_user->ID . '<br />'
}
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)