Re: [PHP] outputting xml declaration
This should not give you any error. Not even if short_open_tags are on as printed output is not parsed. What is the error message and what version of php are you running? It works for me (php 4.3.2). Steven Apostolou wrote: Hello, The folowing code gives an error: print ""; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... Greetings, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] outputting xml declaration
try this print "<\?xml version=\"1.0\"\?>"; This might fix it. - Original Message - From: "Steven Apostolou" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 02, 2003 6:33 AM Subject: [PHP] outputting xml declaration > Hello, > > The folowing code gives an error: > > print ""; > > This is probably because I print a questionmark? How can I avoid that an > error is generated? > > Besides it's not an error in the way that it gives an errorstring but it > writes the output in the error_log of apache... > > Greetings, > > -- > Steven Apostolou <[EMAIL PROTECTED]> > > > -- > 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] outputting xml declaration
Ok never mind about what I said, brain lapse, I was focusing so hard on the ? that I didn't realize it was next to the > . Doh. On Wed, 2003-07-02 at 09:43, Jay Blanchard wrote: > [snip] > print ""; > > This is probably because I print a questionmark? How can I avoid that an > error is generated? > > Besides it's not an error in the way that it gives an errorstring but it > writes the output in the error_log of apache... > [/snip] > > Search the archives of this list, the subject comes up often. > > HTH! > > Jay -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] outputting xml declaration
you can always print like so... print ''; Then the parser does not try to parse inside the line. However, I dont know what will happen when you have short_open_tags in your php.ini file turned on...i usually turn it all of.. -- BigDog On Wed, 2003-07-02 at 07:33, Steven Apostolou wrote: > Hello, > > The folowing code gives an error: > > print ""; > > This is probably because I print a questionmark? How can I avoid that an > error is generated? > > Besides it's not an error in the way that it gives an errorstring but it > writes the output in the error_log of apache... > > Greetings, > > -- > Steven Apostolou <[EMAIL PROTECTED]> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] outputting xml declaration
Disable short open tags. yann On Wed, 2003-07-02 at 09:33, Steven Apostolou wrote: > Hello, > > The folowing code gives an error: > > print ""; > > This is probably because I print a questionmark? How can I avoid that an > error is generated? > > Besides it's not an error in the way that it gives an errorstring but it > writes the output in the error_log of apache... > > Greetings, > > -- > Steven Apostolou <[EMAIL PROTECTED]> -- Yann Larrivee <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] outputting xml declaration
[snip] print ""; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... [/snip] Search the archives of this list, the subject comes up often. HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] outputting xml declaration
Question mark's are not special or reserved in strings like $'s are. That shouldn't be the problem. On Wed, 2003-07-02 at 09:33, Steven Apostolou wrote: > Hello, > > The folowing code gives an error: > > print ""; > > This is probably because I print a questionmark? How can I avoid that an > error is generated? > > Besides it's not an error in the way that it gives an errorstring but it > writes the output in the error_log of apache... > > Greetings, > > -- > Steven Apostolou <[EMAIL PROTECTED]> -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] outputting xml declaration
Hello, The folowing code gives an error: print ""; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... Greetings, -- Steven Apostolou <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php