为什么php include语句返回空白作为ajax响应 [英] Why does php include statement return whitespace as ajax response

查看:50
本文介绍了为什么php include语句返回空白作为ajax响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题中我的问题的示例演示了我遇到的问题.

示例

抱歉,不知道如何使用jsfiddle.

该如何解决?

解决方案

似乎您的空文件"包含空行, http://wx2fly.com/test/emptyFile.php ,这意味着它不为空!

我认为您可以通过使空文件(或非文件)以<?php 开头来解决问题,并确保php标记未在文件末尾关闭./p>

An example of my question in the title demonstrates the problem I'm having.

example

sorry don't know how to use jsfiddle.

And how do I fix it?

解决方案

It seems your "empty file" contain an empty line, http://wx2fly.com/test/emptyFile.php , which means it's not empty !

I think you can fix your problem by making your empty (or not) file starts with <?php, and be sure the php tag is NOT closed at the end of the file.

这篇关于为什么php include语句返回空白作为ajax响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆