Display Php Source Code in Browser - Php

How to display php source code in browser?

Snippet Code


  
Rate this page :
  [ 0 votes]

Function, disp_php_code($code) is used to display the php source code in browser. Use this code to display the php code instead of executing it.

<?php function disp_php_code($code) { $code =htmlentities($code); return $code; } echo disp_php_code("<?php echo 'Hello'; ?>"); ?>

Tags


Ask Questions

Ask Question