Skip to content Skip to sidebar Skip to footer

Php Code Displaying As Comments In Browser Using Wamp

As is says in the title, my PHP code is showing up in the browser code inspector like it is commented out. For example,

Solution 1:

Never use short open tag <? in your PHP code. Always use long tags <?php, simply because <? can be disabled (or not enabled, may depend on distro) in php.ini with short_open_tag directive (and this looks like your culprit). In result, PHP scripts are not processed by PHP interpreter and will usually end up sent to the visitor as plain text, exposing your whole source code (but also DB credentials etc).


Post a Comment for "Php Code Displaying As Comments In Browser Using Wamp"