简体   繁体   English

Apache Alias - PHP 文件由浏览器下载

[英]Apache Alias - PHP files are downloaded by browser instead

PHP files are downloaded by browser instead, when I visiting http://domain.com/hk .当我访问http://domain.com/hk时,PHP 文件由浏览器下载。

but http://domain.hk works finehttp://domain.hk工作正常

======= Platform: CentOS 6 (Plesk Panel) ======== 平台:CentOS 6(Plesk 面板)

My vhost.conf under domain.com我在 domain.com 下的 vhost.conf

AddType application/x-httpd-php5 .php

Alias "/hk" "/var/www/vhosts/domain.hk/httpdocs"
<Directory "/hk">
    Options FollowSymlinks
    AllowOverride All
    Order Allow,Deny
    Allow from all
</Directory>

There is an issues with your PHP-handler.您的 PHP 处理程序存在问题。 Try to remove that from your vhost config and check it.尝试从您的 vhost 配置中删除它并检查它。

And also let me know which php version is installed on your server ?还让我知道您的服务器上安装了哪个 php 版本?

我本人也有同样的问题,这是很久以前的事了,但是您有解决方案吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 要下载的php文件在浏览器中显示,而不是下载 - php files to be downloaded displayed in browser instead of downloaded PHP文件正在下载,而不是通过ssl在浏览器中呈现 - php files being downloaded instead of rendered in browser over ssl PHP文件由浏览器下载,而不是由Laravel项目处理 - PHP files are downloaded by browser instead of processed by Laravel project PHP 文件由浏览器下载,而不是由本地开发服务器 (MAMP) 处理 - PHP files are downloaded by browser instead of processed by local dev server (MAMP) 下载php文件而不是运行 - php files are downloaded instead of ran 正在下载 PHP 文件而不是在网站上显示 - PHP Files Being Downloaded instead of showing on website 通过CMD调用时,Apache下载PHP文件而不是在浏览器中显示(Ubuntu) - Apache downloads PHP files instead of displaying in browser when called via CMD (Ubuntu) 在客户端浏览器中缓存大型PHP文件-状态为“ 200正常”,而不是“ 304未修改”-Apache - Cache big PHP files in client browser - status '200 ok' instead of '304 not modified' - Apache 为什么下载的文件没有下载而是显示在浏览器中? - Why downloaded file is not downloaded instead it is shown in browser? 防止在apache或Windows Server 2008中下载php文件 - prevent php files from being downloaded in apache or Windows Server 2008
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM