HTML to XHTML Converter
Related Tags:
- <? Php
- If (! Empty ($ type)) (
- If ($ type == "path") (
- If (! Empty ($ path)) (
- If (file_exists ($ path) & & is_file ($ path)) (
- $ File = file ($ path);
- If (substr ($ file [0], 0,9)! = "<! DOCTYPE") $ doctype = 0;
- $ File = join ('', $ file);
- Else ()
- Die ( "No such file.");
- )
- Else ()
- Die ( "No file specified.");
- )
- ) Elseif ($ type == "file") (
- If (! Empty ($ file)) (
- Else ()
- Die ( "No file specified.");
- )
- Else ()
- Die ( "No file specified.");
- )
- # Specify html file, check for doctype
- / / $ File = file ( "file.html");
- / / If (substr ($ file [0], 0,9)! = "<! DOCTYPE") $ doctype = 1;
- / / $ File = join ('', $ file);
- # Make tags and properties lower case, close empty elements, quote all properties
- $ Search = array ("'(< \ /?) (\ W +)([^>]*>)' e "
- " '(<\ /?) (Br | input | meta | link | img )([^>]*)( /")' ie, "
- " '(<\ /?) (Br | input | meta | link | img )([^>]*)(/>)' ie"
- " '(<\ /?) (Br | input | meta | link | img )([^>]*)(>)' ie"
- " '(\ W + =) (\ w +)' ie,"
- " '(\ W +=)(.+?)' ie");
- $ Replace = array ( " '\ Ι'. Strtolower ( '\ Κ'). '\ Λ'"
- " '\ Ι \ Κ \ Λ>'"
- " '\ Ι \ Κ \ Λ>'"
- " '\ Ι \ Κ \ Λ / \ Μ'"
- "Strtolower ( '\ Ι'). '\" \ Κ \ "'"
- "Strtolower ( '\ Ι'). '\ Κ'");
- $ File = preg_replace ($ search, $ replace, $ file);
- # Return xhtml-compliant document
- Echo "<textarea cols=\"100\" rows=\"20\">";
- If (isset ($ doctype)) echo '<DOCTYPE html PUBLIC "- / / w3c / / DTD XHTML 1.0 Transitional / / EN" "DTD/xhtml1-transitional.dtd ">'." \ n";
- Echo stripslashes (stripslashes (stripslashes ($ file)));
- Echo "</ textarea>";
- Else ()
- -->
- <DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" "DTD/xhtml1-transitional.dtd">
- <head> <title> HTML -> XHTML Convertor </ title> </ head>
- <body>
- <! - WARNING: this input method is a security risk on open servers //-->
- <Form action ="<?=$ PHP_SELF?> "Method =" get ">
- <input Type="hidden" name="type" value="path" />
- <font Face="verdana"> File path: </ font> <input type="text" name="path" size="50" />
- <input Type="submit" value="Submit" />
- </ Form>
- <b> <font Face="verdana"> OR </ font> </ b> <br /> <br />
- <Form action ="<?=$ PHP_SELF?> "Method =" get ">
- <input Type="hidden" name="type" value="file" />
- <font Face="verdana"> File contents: </ font> <br />
- <textarea Name="file" rows="10" cols="50"> </ textarea> <br />
- <input Type="submit" value="Submit" />
- </ Form>
- </ Body>
- </ Html>
- <?
- )
- -->
- HTML Tutorial - HTML entry
- HTML Image primary Guide
- HTML tags and attributes of the Semantic
- The evolution of HTML
- Intermediate HTML tutorial Javascript
- Why should discard the HTML
- HTML forms Senior Guide
- HTML text Senior Guide
- Html file in the introduction of other html document Methods
- Analysis Html page: HTML Parser trial
- Beginners Guide to HTML - HTML document as a whole
- Intermediate HTML form guide
- Html ? W ? W ? HTML?Z ?
- HTML ? ?-? ?
- HTML Video Tutorial: HTML basic structure
- HTML primary Guide List
- Guide to HTML primary links
- HTML paragraphs primary Guide
- HTML High statement Guide
- HTML Tutorial - HTML basic structure
National IP Address Allocation Table (c)

Col.com.cn, the network industry - Shenzhen, Shenzhen, Guangdong, CN, 203.208.0 .* Col.com.cn, the network industry - Shenzhen, Shenzhen, Guangdong, CN, 203.208.1 .* Col.com.cn, the network industry - Shenzhen, Shenzhen, Guangdong, CN, 203.208.2 .* Cq...
Dr. founder of the Chinese overseas debt repayments blog site

"Debt repayments on television" to help run the United States debt collection follow-up to Chinese enterprises Had opened "the United States and debt repayments on network television," the famous Dr. Liuhaishan the United States and there have been new actio...
HTML achieve automatic typesetting rules 2

Rule 5: the check box, radio button labelled with their separation Unit will be in the box, radio button with the label controls separation, which can guarantee that when the text change for a long time to correct. There is a need to design the dialog box, try to ma...
Css Guide: CSS syntax (CSS Syntax)

CSS Syntax: CSS syntax The CSS syntax is made up of three parts: a selector, a property and a value: CSS syntax consists of three parts: a choice, and a value of an attribute: Example Source Code [CSS tutorial] selector (property: value)...
CSS vs. Tables [E text]

About CSS is to control the layout of Web pages to replace the original Table controlled manner, E, it is difficult understood, huh, but the necessary research, and not on how to achieve. There are many links in the reference cited article, perhaps some clues can be found. ...