Created
December 6, 2012 13:50
-
-
Save r-plus/4224581 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once 'classTextile.php'; | |
| if ( isset($_SERVER['PATH_TRANSLATED']) ) { | |
| $file = realpath($_SERVER['PATH_TRANSLATED']); | |
| $ext = substr($file, strrpos($file, '.') + 1); | |
| } | |
| if ( $file and is_readable($file) and $ext === 'textile') { | |
| $textile = new Textile(); | |
| $body = $textile->TextileThis(file_get_contents($file)); | |
| } else { | |
| $body = '<p>cannot read file</p>'; | |
| } | |
| header('Content-Type: text/html;'); | |
| echo '<html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| </head> | |
| <body> | |
| ' . | |
| $body | |
| . ' </body> | |
| </html> | |
| '; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment