[PHP] Newline
Hi NG! I have switched to using single quotes, and found out that newline (\n) only works in double quotes. It looks kind of stupid using 'someString'.\n; and it`s kind of inconsistent using double quotes for some lines like someString\n;. What`s the best way to get a consitent code? -- Kind regards, magoo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file() ignores PHP tags
Hi NG! I wanna output several kinds of ascii files. Two things are bothering me right now: 1. I don`t get the PHP starttag (?php) in my output, but the ending tags. Is there anything I can to to get all of it? 2. How can I stop the browser to render HTML output, in order to get plain ascii? Cheers! -- Kind regards, magoo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file() ignores PHP tags
Peter Lauri wrote: Your array that you get from the file() will contain the ?php tag, but you will not see it in your browser as it is parsed as html. header(Content-type: text/plain); ontop of your script will output plain text. Hope it helps. Hi NG! I wanna output several kinds of ascii files. Two things are bothering me right now: 1. I don`t get the PHP starttag (?php) in my output, but the ending tags. Is there anything I can to to get all of it? 2. How can I stop the browser to render HTML output, in order to get plain ascii? Yes, that is a little better. Thanks for that! But now all the PHP is removed. Is there some other header to send, in order to get PHP in my output? -- Kind regards, magoo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file() ignores PHP tags
Peter Lauri wrote: Your array that you get from the file() will contain the ?php tag, but you will not see it in your browser as it is parsed as html. header(Content-type: text/plain); ontop of your script will output plain text. Hope it helps. I wanna output several kinds of ascii files. Two things are bothering me right now: 1. I don`t get the PHP starttag (?php) in my output, but the ending tags. Is there anything I can to to get all of it? 2. How can I stop the browser to render HTML output, in order to get plain ascii? Weird thing: I acually get my PHP echoed, but I get two HTML doctypes (the same one...). -- Kind regards, magoo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file() ignores PHP tags
Peter Lauri wrote: Your array that you get from the file() will contain the ?php tag, but you will not see it in your browser as it is parsed as html. header(Content-type: text/plain); ontop of your script will output plain text. Hope it helps. I wanna output several kinds of ascii files. Two things are bothering me right now: 1. I don`t get the PHP starttag (?php) in my output, but the ending tags. Is there anything I can to to get all of it? 2. How can I stop the browser to render HTML output, in order to get plain ascii? Weird thing: I acually get my PHP echoed, but I get two HTML doctypes (the same one...). -- Kind regards, magoo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Buxa Coding Guidelines
Hi NG! Just wanted to see what you think of the strictness of Buxa, according to their PHP guidelines: http://www.buxaprojects.com/en/php_coding_guidelines.htm In their oppinion stuff like the short PHP init ? or inline echo ?= $var ? is forbidden. Do you people code that strict? -- Kind regards, magoo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php