index.php
<?php
echo '
<html>
<head>
<meta http-equiv="Content-Language" content="en"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>require() test</title>
</head>
<body>';
require ("body.php");
echo '
</body>
</html>';
?>
body.php
<?php echo ' <p>Test...</p> <hr> <table border="0" width="100%"> <tr align="left" width="100%"> There is a <b>""</b> symbol at the end of <b>body</b> tag. But why? </tr> </table> <hr> <br>'; ?>
The problem is, that including something from another file using require() or include() generates unwanted symbol "". You probably do not see it, but copy and paste it to Notepad or smth and you will see.
Here is the the result:
<html> <head> <meta http-equiv="Content-Language" content="en"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>require() test</title> </head> <body> <p>Test...</p> <hr> <table border="0" width="100%"> <tr align="left" width="100%"> There is a <b>""</b> symbol at the end of <b>body</b> tag. But why? </tr> </table> <hr> <br> </body> </html>If I am just eching the code in the same index.php, everything is fine.
Any suggestion how to fix this (remove that symbol).
P.S. require() or include() must be there.


Sign In
Create Account


Back to top











