php - Stuck on include() in a wordpress theme -
i'm going include()
php file in wordpress theme file. file header.php, , function like:
<?php error_reporting(e_all); $filename = "path/to/file.php"; if (file_exists($filename)){ echo 'ok'; include($filename); } ?>
"ok" printed in resulting html, output stops after. used both relative , absolute path same result. missing home themes work?
file permissions ok.
edit: display_errors set off in wordpress. had enable find error , resolve. fatal.
$filename = "file.php"; // first of needs quoted // $filename, not filename. missing $ before variable name if (file_exists($filename)){ echo 'ok'; include($filename); }
Comments
Post a Comment