Re: [PHP] Code spacing causing HEADER problem?
You absolutely can not send anything to the browser before a header is sent... so if you put a space in there, it gets sent to the client.. no good.. its not the code thats the problem . its that you escaped from php and left space between. Jason BOOT [EMAIL PROTECTED] wrote: I don't get this! Why does example (a) work for me but not example (b) ??? I realize that no output can be sent to the browser before the header but why would code linepace effect? Thanks for any info! (a) ?php $a = 1; ? ?php header(Location: 1.php);? (b) ?php $a = 1; ? ?php header(Location: 1.php);? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code spacing causing HEADER problem?
On Saturday 18 September 2004 06:35, BOOT wrote: I don't get this! Why does example (a) work for me but not example (b) ??? I realize that no output can be sent to the browser before the header but why would code linepace effect? Thanks for any info! (a) ?php $a = 1; ? ?php header(Location: 1.php);? (b) ?php $a = 1; ? ?php header(Location: 1.php);? If the manual didn't already made it abundantly clear why that is, a quick search in the archives for the error message you get when running (b), would've given you more answers than you need. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Peers's Law: The solution to a problem changes the nature of the problem. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code spacing causing HEADER problem?
* Thus wrote BOOT: I don't get this! Why does example (a) work for me but not example (b) ??? I realize that no output can be sent to the browser before the header but why would code linepace effect? Thanks for any info! (a) ?php $a = 1; ? ?php header(Location: 1.php);? (b) ?php $a = 1; ? ?php header(Location: 1.php);? PHP is friendly only for one CR and nothing else try this test to see how it outputs the data: a) ?php echo 'Constant'; ? ?php echo 'LineOfText'; ? b) ?php echo 'NotConstant' ? ?php echo 'LineOfText' ? a output) ConstantLineOfText b output) NotConstant LineOfText Be sure to view source if you run it in through a web browser. Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php