在DigitalOcean搭建网站,国内无法访问,请问有类似遭遇吗

在DigitalOcean搭建网站,国内无法访问,请问有类似遭遇吗,第1张

某些DNS被污染得无法解析了。以下是我的测试。199.1用的是阿里的DNS,199.197是我自己用的SecDNS。lz可以下载个secdns用用。链接见我的介绍。

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 />'

}


欢迎分享,转载请注明来源:夏雨云

原文地址:https://www.xiayuyun.com/zonghe/356966.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-09
下一篇2023-05-09

发表评论

登录后才能评论

评论列表(0条)

    保存