禁用统计数据/分析的Javascript统计数据、Javascript

由网友(我的孤单变成不安)分享简介:我的免费虚拟主机提供商追加分析JavaScript来所有的PHP和HTML文件。这是很好的,但我使用的NuSOAP创造一个web服务我正在一个WSDL文件。我的织补主机其加入到我的PHP生成WSDL文件。My free webhost appends analytics javascript to all PHP a...

我的免费虚拟主机提供商追加分析JavaScript来所有的PHP和HTML文件。这是很好的,但我使用的NuSOAP创造一个web服务我正在一个WSDL文件。我的织补主机其加入到我的PHP生成WSDL文件。

My free webhost appends analytics javascript to all PHP and HTML files. Which is fine, except that I'm using nuSoap to create a WSDL file for a webservice I'm working on. My darn host adds this to my php-generated WSDL file.

有些人认为它添加到.htaccess文件:

Some people have suggested add this to the .htaccess file:

AddType text/xml .php

这是花花公子,但它会禁用PHP引擎为好,而且也没有办法生成WSDL即可。

Which is dandy, but it disables the PHP engine as well, and there's no way to generate the WSDL then.

我到处找,没有运气。主机商并没有电子邮件或支持票响应无论是。

I've searched everywhere, no luck. Webhost does not respond to emails or support tickets either.

编辑:我的虚拟主机使用的脚本Histats。出版Histats.com。此外,这个JavaScript块超出了< HTML>< / HTML> 标签并不会通过验证

The script my webhost uses is Histats. Published by Histats.com. Also, this JavaScript block falls outside the <html></html> tags and won't pass validator.

推荐答案

根据@戈的评论...

As per @Gerben's comment...

添加&LT;! - 不起作用。主机已经开始评论他们的额外的东西,而 - &GT; 下面被覆盖

Adding <!-- does not work. The host already starts their extra stuff with a comment, and the --> that follows gets overridden.

添加标题(内容类型:文本/ XML'); 不执行任何操作时,JavaScript仍然显示

Adding header('Content-Type: text/xml'); does nothing, the javascript still shows.

不过!我们已经找到了答案......把退出();!在PHP脚本结束后将禁用此功能

HOWEVER! We've found the answer... putting exit(); at the end of the PHP script will disable this function!

作为一个侧面说明,以@Gerben先生 - 谢谢你,我已经投了你的其他的答案之一,所以你获得信贷这个...

As a side note to Mr. @Gerben -- Thank you, and I've voted up one of your other answers, so you get credit for this...

阅读全文

相关推荐

最新文章