xampp訪問慢
假設80改為了8001 則使用 http://localhost:8001 訪問xampp主頁, 訪問xampp下的其他php也是這樣
② 為什麼用xampp的wordpress建立的網站內網可以訪問,外網訪問不能
看一下你的xampp有沒有關閉安全模式,或者再檢查一下iptables是不是啟動狀態
③ mac上用xampp搭建wordpress本地環境 怎麼頁面反應很慢
先判斷下是否登錄,然後獲取當前用戶對象,然後獲取當前用戶對象的信息,需要哪些用哪些:
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 />';
}