Re: Re: [RFC] No PHP tags

From: Date: Tue, 11 Feb 2014 23:43:10 +0000
Subject: Re: Re: [RFC] No PHP tags
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-72487@lists.php.net to get a copy of this message
Yasuo Ohgaki wrote:
I like the way PHP works. Embedded script nice for web applications and we should not drop it, but it's better for security if it is restricted to only where it is needed.
OK Re-reading the whole RFC ... it is all about 'template_mode' being used to switch tag handling on and off? PHP 'Open' tag being optional seems to be secondary? ------------------ function render_template($template, $template_vars) { ini_set('template_mode', 'on); // Older PHP ignores // Do what ever required as template ini_set('template_mode', 'off'); // Older PHP ignores } ------------------ When switching on template_mode what actually happens? Is it actually in PHP mode so that you have to add a ?> before loading raw html and then 'close' with a <?php before switching template mode off. How does one 'include' a raw html file with embedded PHP? The include needs to be in PHP space, but needs to open the file in html mode? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

Thread (37 messages)

« previous php.internals (#72487) next »