/ Published in: PHP
You can save this function in your common function file of config file, which must be included in the page which source code you want to see and simply add kode to the end of the URL and see the complete PHP code of that file on browser
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /* this function is used to debug runtime variables if URL is like below : http://localhost/project/admin/pages.php?go=modules/auction/add then it will show the code of moudles/auction/add.php file simply by adding 'kode' at the end of the url or it will display the source code of running file whether thii function is written on config.php file */ //__print(show_source($file)); highlight_num($file); } function highlight_num($file) { echo ' <style type="text/css"> .num { float: left; color: gray; font-size: 13px; font-family: monospace; text-align: right; margin-right: 6pt; padding-right: 6pt; border-right: 1px solid gray;} body {margin: 0px; margin-left: 5px;} td {vertical-align: top;} code {white-space: nowrap;} </style>'; echo "<table><tr><td class=\"num\">\n$lines\n</td><td>\n$content\n</td></tr></table>"; } ?>