WAMP:虚拟主机PHP不能正常工作

时间:2015-11-28 16:06:28

标签: php apache wampserver

我的配置似乎有效,因为我可以访问虚拟主机下的文件,例如@using PagedList.Mvc; @using PagedList; @model IPagedList<Cmedia.Models.Employee> @foreach (var item in Model) { @Html.DisplayFor(modelItem => item.EmployeeID) &nbsp; @Html.DisplayFor(modelItem => item.EmployeeName) <br> } Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount @Html.PagedListPager(Model, page => Url.Action("Index", new { page })) 。但是一旦我尝试进入PHP页面,我的浏览器(Chrome和Firefox)就开始下载该文件(例如http://sailing/test.txt)。

http://sailing/phpinfo.php

<VirtualHost *:80> DocumentRoot "F:/wamp/www" ServerName localhost ServerAlias localhost <Directory "F:/wamp/www"> AllowOverride All <IfDefine APACHE24> Require local </IfDefine> <IfDefine !APACHE24> Order Deny,Allow Deny from all Allow from 127.0.0.1 localhost ::1 </IfDefine> </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "F:/wamp/www/sailing" ServerName sailing ServerAlias sailing <Directory "F:/wamp/www/sailing"> AllowOverride All <IfDefine APACHE24> Require local </IfDefine> <IfDefine !APACHE24> Order Deny,Allow Deny from all Allow from 127.0.0.1 localhost ::1 </IfDefine> </Directory> </VirtualHost> localhost也正在发挥作用。我使用的是WampServer 2.5(Apache 2.4.9,PHP 5.5.12,MySQL 5.6.17)。

最小配置似乎也无法发挥作用。

localhost/phpmyadmin

0 个答案:

没有答案