I have a simple CakePHP application and in my Views, I dynamically set the title for each view:
<? $this->viewVars['title_for_layout'] = 'Wicked Awesome Title' ?>
However on one of my machines, the code is not run but instead outputted to the browser windows as if it weren't recognized PHP code.
<!-- Actual output in the browser window. -->
viewVars['title_for_layout'] = 'Wicked Awesome Title' ?>
If I place the proper <?php
tag, everything runs fine, but that is not the default way CakePHP recommends.
Why does it work on one machine, but not in the other?
One of your machines does not have short_open_tags
enabled in its configuration.