Make PHP includes print their file location while in `dev` mode -
Make PHP includes print their file location while in `dev` mode -
we've seen websites code this:
<!-- begin /a4/includes/nav_include.php --> <div ... > <!-- end /a4/includes/nav_include.php -->
this sloppy , annoying, understand need able figure out file responsible source code you're seeing. i'd prefer way create include
d , require
d files automatically spit info out, when in toggleable dev mode.
obviously, this:
<?php if($devmode){ echo "<!-- begin /a4/include/snav_include.php -->"; } include("/a4/includesnav_include.php"); if($devmode){ echo "<!-- end /a4/includes/nav_include.php -->"; } ?>
but becomes annoying , sloppy on whole other level. i'd prefer best of both worlds, have functionality of above can still write includes this:
<?php include("/a4/includes/nav_include.php"); ?>
is there way this?
php include require require-once php-include
Comments
Post a Comment