Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess htaccess和AddType/Addhandler_.htaccess - Fatal编程技术网

.htaccess htaccess和AddType/Addhandler

.htaccess htaccess和AddType/Addhandler,.htaccess,.htaccess,我的主站点脚本使用php4,它可以很好地与AddHandler配合使用。由于服务器已配置或默认情况下为php5.3,我假设在向子目录添加另一个脚本时,我所要做的就是使用下面的Addhandler/AddType之一,但它不起作用。当我在页面作为下载发送到浏览器之前添加了3行中的任何一行,这样它就不会处理文件以供显示。除了Addhandler之外,我的htaccess是完全空白的。这也是在一个专用服务器上 AddType application/php5-script php html tpl

我的主站点脚本使用php4,它可以很好地与AddHandler配合使用。由于服务器已配置或默认情况下为php5.3,我假设在向子目录添加另一个脚本时,我所要做的就是使用下面的Addhandler/AddType之一,但它不起作用。当我在页面作为下载发送到浏览器之前添加了3行中的任何一行,这样它就不会处理文件以供显示。除了Addhandler之外,我的htaccess是完全空白的。这也是在一个专用服务器上

AddType application/php5-script php html tpl 
AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml .tpl .html
AddHandler application/x-httpd-php53 .php .php4 .php3 .phtml .tpl .html

    to explain better..
    1. www.site.com is run php4 (script req. it)
    2. www.site.com/newscript/ needs php5
    3. i put a .htaccess in the www.site.com/newscript/ folder with 
Addhandler for php5 but it doesn't work

我被你的问题弄糊涂了,你的意思是你在同一台服务器上运行php4和php5,并且希望站点的某些部分运行php4和php5吗

如果它是一个新服务器,而您无法让发布的代码正常工作,您尝试过吗

 AddType application/x-httpd-php .php .php4 .php3 .phtml .tpl .html

我被你的问题弄糊涂了,你的意思是你在同一台服务器上运行php4和php5,并且希望站点的某些部分运行php4和php5吗

如果它是一个新服务器,而您无法让发布的代码正常工作,您尝试过吗

 AddType application/x-httpd-php .php .php4 .php3 .phtml .tpl .html

服务器需要运行最新的PHP5.3,您可以使用
.htaccess
将其降级为PHP4,但如果服务器至少未运行PHP5.3,则无法使用
.htaccess
使其降级。明白了吗?

服务器需要运行最新的PHP5.3,您可以使用
.htaccess
将其降级为PHP4,但如果服务器至少未运行PHP5.3,则无法使用
.htaccess
使其运行。明白了吗?

为了更好地解释。。1.www.site.com运行php4(script req.it)2。www.site.com/newscript/需要php5 3。我在www.site.com/newscript/文件夹中添加了一个.htaccess,其中包含了php5的Addhandler,但无法更好地解释。。1.www.site.com运行php4(script req.it)2。www.site.com/newscript/需要php5 3。我在www.site.com/newscript/文件夹中放置了一个.htaccess,其中包含php5的Addhandler,但它不起作用