wamp配置注意事項

wamp局域網可訪問配置:

提示You don't have permission to access / on this serverphp

搜索了一下,獲得的結果基本上,以下設置:web

1
2
3
AllowOverride all        
Order allow,deny
Allow from all

但怎麼設置依然仍是提示You don't have permission to access / on this server.apache

 Require local 換成 Require all granted便可
ide

wamp中index.php配置問題

新安裝的wampserver,進到localhost以後,點擊本身的web目錄xxx時候,會自動跳轉到http://xxx,由於沒有在apache的www目錄中,因此不能進行顯示,須要手動輸入http://localhost/xxx才能夠。要怎麼配置呢,修改www目錄中的index.php文件,以下的代碼塊 ui

while (($file = readdir($handle))!==false) 
{
	if (is_dir($file) && !in_array($file,$projectsListIgnore)) 
	{		
		//[modif oto] Ajout éventuel de http:// pour éviter le niveau localhost dans les url
		$projectContents .= '<li><a href="'.($suppress_localhost ? 'http://' : '').$file.'">'.$file.'</a></li>';
	}
}

http://後邊加上localhost/就行,即:this

while (($file = readdir($handle))!==false) 
{
	if (is_dir($file) && !in_array($file,$projectsListIgnore)) 
	{		
		//[modif oto] Ajout éventuel de http:// pour éviter le niveau localhost dans les url
		$projectContents .= '<li><a href="'.($suppress_localhost ? 'http://localhost/' : '').$file.'">'.$file.'</a></li>';
	}
}
相關文章
相關標籤/搜索