Re: <?xml version="1.0" encoding="UTF-8>
| From: | Philip Olson | Date: | Tue, 24 Jun 2003 04:33:42 +0000 |
| Subject: | Re: <?xml version="1.0" encoding="UTF-8> | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-152564@lists.php.net to get a copy of this message | ||
On Mon, 23 Jun 2003, Doug Essinger-Hileman wrote:
>
> On 23 Jun 2003 at 13:22, CPT John W. Holmes wrote:
>
> > The first two characters are opening up a PHP block of code, so you
> > get a parse error. Either disable short open tags in php.ini,
>
> I don't have access to php.ini. Can I do this on a script by script
> basis with
>
> ini_set(short_open_tag, off)
No. (btw, be sure to quote your strings). In reading
the table found here:
http://www.php.net/ini_set
You will notice short_open_tag has this level:
PHP_INI_SYSTEM|PHP_INI_PERDIR
And according to the documentation, most namely the
documenation found here:
http://www.php.net/configuration.changes
It can be set in the following (in Apache) or similar
depending your web server:
.htaccess
php.ini
httpd.conf
Closest you have is .htaccess But, if you don't want
to worry about it, just use echo as someone already
suggested, instead of embedding it. Something like:
echo '<?xml version="1.0" encoding="UTF-8">';
Btw, the question proposed in this thread is also a
documented FAQ here:
http://www.php.net/manual/en/faq.using.php#faq.using.mixml
Regards,
Philip