000webhost、PHP 和 LoadVars AS2
我正在使用 AS2 从 HTTP 服务器下载和上传数据,另一端使用一些 PHP。上传效果很好,但我在下载时遇到了一个小问题,因为我使用的网络主机在每个文件的末尾附加了一些 HTML 注释。我的 PHP 工作得很好,但是这个小小的 HTML 注释破坏了整个 LoadVars 变量字符串。例如:
&coins=211108&xp=751029&credits=5&blah=p
<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
我想知道是否有人能想到一种解决方法,因为我个人一直在尝试集思广益并寻找一种解决方法,但没有成功。如果最坏的情况发生,我想我总是可以选择一个新的虚拟主机或自己托管。
I am using AS2 to download and upload data from an HTTP server using some PHP on the other end. The upload works great, but I ran into a little issue with the download, since the webhost that I am using appends a little HTML comment to the end of every file. My PHP works great, but this little HTML comment destroys the whole LoadVars variable string. For example:
&coins=211108&xp=751029&credits=5&blah=p
<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
I was wondering if anyone could think of a workaround since I personally have been trying to brainstorm and search for one for a while and couldn't. If worst comes to worst, I guess I can always either get a new webhost or host it myself.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以禁用 000webhost 的分析,请阅读此处:
http://www .000webhost.com/forum/announcements/2160-disabling-analytics-code.html
You can disable analytics for 000webhost, read here:
http://www.000webhost.com/forum/announcements/2160-disabling-analytics-code.html
您可以与他们交谈并要求他们不要将其添加到此类请求中。
或者你可以让你的 Actionscript 忽略换行后的所有内容(但是据我所知,你必须为此编写自己的
LoadVars()
。除此之外,我认为你运气不好!
You could talk to them and ask them not to add it to such requests.
Or you could make your Actionscript ignore everything after a line break (but AFAIK, you'd have to write your own
LoadVars()
for that.Other than that, I think you're out of luck!