1

In php how to enablw short_open_tag to 1/true in certain pages?

sreenavc
  • 729
  • 3
  • 10
  • 19
  • http://php.net/manual/en/configuration.changes.php – Ignacio Vazquez-Abrams Feb 14 '11 at 10:49
  • possible duplicate of [How to enable PHP short tags ?](http://stackoverflow.com/questions/2185320/how-to-enable-php-short-tags) and a couple others. Please use the Search Function before asking: [http://stackoverflow.com/search?q=how+to+enable+short+tags+php](http://stackoverflow.com/search?q=how+to+enable+short+tags+php) – Gordon Feb 14 '11 at 10:50
  • @Gordon — not a duplicate of that question as it talks about global config settings, not inside a specific page. – Quentin Feb 14 '11 at 10:51
  • @David so the answer isn't to enable them in the ini? – Gordon Feb 14 '11 at 10:52
  • 1
    @Gordon — the *question* doesn't appear to be able enabling them in ini. OTOH, I could be reading too much into "In php pages". – Quentin Feb 14 '11 at 10:54
  • 1
    @screenavc please clarify whether you want to enable short open tags for just one specific page or for any pages in your application. – Gordon Feb 14 '11 at 11:00
  • 1
    @David stop misguiding people. There is no reason nor deprecation. – Your Common Sense Feb 14 '11 at 11:08
  • 2
    @David Dorward: The "short tags are deprecated and going to be removed in (++currentVersion)!" meme is a well known as an urban legend that has been going around for years, it's okay it's not true though - it just stems from a confusing, outdated mailing list discussion. – Iain Collins Feb 14 '11 at 11:28

1 Answers1

1

Not recommended but, based on the manual for ini directives and setting them inline:

ini_set ( 'short_open_tag' , '1' );

… in newer versions of PHP, you can't set this from within the page.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335