函数问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 13:09:05995browse



函数php代码:


function prin(){
   echo 'a';
}
?>


 页面代码:
require 'function1.php';
prin();
?>

打开下面的页面,在输出a之间有个空格,请问这个空格怎么去掉啊?


回复讨论(解决方案)

去掉 function1.php 中的 ?>

改为

<?phprequire 'function1.php';ob_clean();prin();?>

改为

<?phprequire 'function1.php';ob_clean();prin();?>




能解释下原因么,谢谢。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn