Reputation: 23
I'm creating a PHP application within Heroku. The problem is Heroku doesn't understand some tags as PHP. For example, <?=$some_var?>
is not recognized as PHP, but as pure HTML.
Do I have to configure something or use <?php echo $some_var ?>
, for example, instead?
Upvotes: 1
Views: 1609
Reputation: 429
You need to turn on short opening tags for your app on Heroku. Create a file called "php.ini" in the root folder of your project and add the following to it:
short_open_tag = true
Upvotes: 4
Reputation: 9471
These <?=
opening tags are called "short opening tags", and their use is set the PHP configuration file.
It is generally not advised to use short tags for this very reason; there's no guarantee the server you'll deploy on will be configured to use them.
Upvotes: 3