php - Freak "1" number appear after require and echo blanc file -
i have freak problem :-)
please, see simple website: http://tests.vipserv.org/
there is... "1" number. in code there no "1"...
i converted eol unix. no results. changed coding utf with/without boom.
"website" created files: index.php:
<?php class view { public static $tpl_view = 'view.php'; public static function renderview($template, $data = array()) { echo require $template; } public static function generateview($template, $data = array()) { return require $template; } } view::renderview(view::$tpl_view, ''); ?>
and view.php:
(blanc)
you can download files from:
thanks, a.
you echoing out yourself. according manual:
handling returns: include returns false on failure , raises warning. successful includes, unless overridden included file, return 1.
so instead of:
echo require $template;
you want:
require $template;
assuming template not supposed return of course.
Comments
Post a Comment