PHP problem: how to disable short_open_tag
Posted by: Kir
Posted on: 2008-05-17 22:34:00
Hello Dreamhost. I have PHP problem:
By the W3C declaration I have to use this code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
xml:lang="en" >
and, as you said in http://wiki.dreamhost.com/index.php/XHTML
<?php
header("Content-Type: application/xhtml xml; charset=utf-8");
?>
in the beginning of PHP file, but "<?xml" gives me error:
Parse error: syntax error, unexpected T_STRING in /home/.justy/username/domain/index.php on line 3
Both .htaccess's «php_value short_open_tag false» and .php's «ini_set("short_open_tag", false);» don't work.
What should I do? How should I disable PHP's «short_open_tag» directive?
Edited by Kir on 05/17/08 10:41 PM (server time).