Hi
At the moment im finally trying to pitch together a working webspace, have had my domain for years now, never really uploaded anything finished to it.
Now i wanted to start up with creating a simple php form script to upload my files automatic to the server, when ever i finished a mirc script or updated it.
So far so good, i know my basic (x)html and php, but i run into trouble as far as defining the document type (line 1 of the file).
According to w3c, i should have my first line something like:
Code:
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
this works almost if i name my file test.htm, but if i name the file test.php i get this error from my webspace:
Code:
Parse error: syntax error, unexpected T_STRING in /usr/home/web/web58292/djabba.eu/test/test.php on line 1
but if i name it .htm the server wont interpret my php code, if i name it .php i can not define the xml and w3c wont validate the page.
---
first i thought it was a server issue, but they claim its a programming issue of mine. So before i bitch em more, i though i'll ask you ppl here, you know a lot about these things.
the test file is as simple as:
Code:
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title</title>
</head>
<body>
<?php
$myString = "Hello!";
echo $myString;
echo "<h5>I love using PHP!</h5>";
?>
</body>
</html>
url
http://djabba.eu/test/test.php _
http://djabba.eu/test/test.htm
---
when i name it htm, there is still one issue though that wont validate, and i cant seem to find the mispelling. As far as i can read, i spelled it excact the same in the file as they say i should when i validate....
Code:
DOCTYPE Override in effect!
The detected DOCTYPE Declaration "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">" has been suppressed and the DOCTYPE for "XHTML 1.0 Transitional" inserted instead, but even if no errors are shown below the document will not be Valid until you update it to reflect this new DOCTYPE.
Hope someone can help, and even if you cant, thanks for reading and trying to help out. Maybe its all right and i just get it completly wrong, but you dont learn if you dont ask.
-dJabba
[edit] removed 1 prob, was w3c's validator, server crashed rebooted and htm is validating fine now.