PHP - Short Open Tag
If you as a beginner PHP programmer who using XAMPP, maybe someday you'll find a problem like this.
<?php
?>
but you can see the last is not the smart way because you have to spend much time checking all those codes.
Problem: The code (PHP tag) show in HTML page
to fix it, open control panel XAMPP and open configuration of php.ini file, then search "short_open_tag". If you got it, change it to off.
or
you have to check all of your code if there's a PHP code in the tag like this
<?
?>,
change to
<?
?>,
change to
<?php
?>
but you can see the last is not the smart way because you have to spend much time checking all those codes.
I'd prefer to change the configuration in php.ini. It's simple and saves time.
Thanks.
Happy coding ~
Comments
Post a Comment