標籤:
本地環境用http://localhost/訪問,但是在做移動端的時候想用手機訪問出現了問題,後來在網上查到解決方案。
修改php的設定檔httpd.conf。
<Directory />Options FollowSymLinksAllowOverride NoneOrder deny,allowDeny from allSatisfy all</Directory>
修改成
<Directory />Options FollowSymLinksAllowOverride NoneOrder deny,allow# Deny from allAllow from all#允許所有訪問Satisfy all</Directory>
還有
<Directory "E:\wamp\www">## Possible values for the Options directive are "None", "All",# or any combination of:# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews## Note that "MultiViews" must be named *explicitly* --- "Options All"# doesn‘t give it to you.## The Options directive is both complicated and important. Please see# http://httpd.apache.org/docs/2.2/mod/core.html#options# for more information.#Options Indexes FollowSymLinks## AllowOverride controls what directives may be placed in .htaccess files.# It can be "All", "None", or any combination of the keywords:# Options FileInfo AuthConfig Limit#AllowOverride all## Controls who can get stuff from this server.## onlineoffline tag - don‘t removeOrder Deny,AllowDeny from allAllow from 127.0.0.1</Directory>
修改成
<Directory "E:\wamp\www">## Possible values for the Options directive are "None", "All",# or any combination of:# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews## Note that "MultiViews" must be named *explicitly* --- "Options All"# doesn‘t give it to you.## The Options directive is both complicated and important. Please see# http://httpd.apache.org/docs/2.2/mod/core.html#options# for more information.#Options Indexes FollowSymLinks## AllowOverride controls what directives may be placed in .htaccess files.# It can be "All", "None", or any combination of the keywords:# Options FileInfo AuthConfig Limit#AllowOverride all## Controls who can get stuff from this server.## onlineoffline tag - don‘t removeOrder Deny,Allow# Deny from all# Allow from 127.0.0.1Allow from all</Directory>
然後儲存後重啟服務,注意把目錄修改成自己的本地環境目錄!
關於通過行動裝置訪問本地環境解決方案