wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b搭建php环境
在win下,下载wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe,默认安装。
然后打开安装目录下apache的httpd.conf配置文件D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
修改如下:
<span> 1</span> Listen 0.0.0.0:8088 <span> 2</span> Listen [::0]:8088 <span> 3</span><span> 4</span> ServerName localhost:8088 <span> 5</span><span> 6</span> DocumentRoot "D:/kkkoffice/wwwroot" <span> 7</span><span> 8</span> <directory></directory> <span> 9</span><span>#</span><span>AllowOverride none</span><span>10</span><span>#</span><span>Require all denied</span><span>11</span><span> Options FollowSymLinks </span><span>12</span><span> AllowOverride None </span><span>13</span> Order deny,<span>allow </span><span>14</span><span>#</span><span>Deny from all</span><span>15</span><span> allow from all </span><span>16</span> <span>17</span><span>18</span> <directory> <span>19</span><span> Options FollowSymLinks </span><span>20</span><span> AllowOverride None </span><span>21</span> Order deny,<span>allow </span><span>22</span><span> allow from all </span><span>23</span> </directory>
说明:
Listen 监听端口
ServerName 服务器名字(带有端口号)
DocumentRoot php文件路径(注意:最后面一定不要带"/")
可能出现的问题:访问 http://localhost:8088/phpinfo.php
如果出现You don't have permission to access /test/file.php on this server
注释Deny from all ----拒绝所有想访问
添加allow from all
每次修改完apache的httpd.conf都记得要重启apache
重启刷新页面正常访问如下
好啦,环境已经搭建成功!
以上就介绍了php环境搭建wampserver、Apache、Mysql和php,包括了wampserver,php环境搭建方面的内容,希望对PHP教程有兴趣的朋友有所帮助。