Can someone explain to me how to get a .php document that uses the shebang at the beginning of the file to pass the XHTML validator? I keep getting one error that states that I have to put the xml utf-8 declaration at the beginning of the file. When I do that I have to remove my shebang from line one. As a result, the server cant read my document and I get an error. For example the below file does not pass XHTML validation:
#!/usr/local/bin/php
<?= '<' . '?xml version="1.0" encoding="utf-8"?' . '>' ?>
<?php
$strLessonDescription = file_get_contents('http://example.com/.../lesson5.txt');
if ($strLessonDescription == NULL)
print "Error - lesson5.txt cannot be opened";
$arrLessonVocabulary = array();
$arrLessonVocabulary = file("http://example.com/.../vocabulary5.txt");
if ($arrLessonVocabulary == NULL)
print "Error - vocabulary5.txt cannot be opened";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >