]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - pages/examplepage.php
Fix end of line
[Github/YOURLS.git] / pages / examplepage.php
1 <?php
2
3 // Make sure we're in YOURLS context
4 if( !defined( 'YOURLS_ABSPATH' ) ) {
5         // Attempt to guess URL via YOURLS
6         $url = 'http://' . $_SERVER['HTTP_HOST'] . str_replace( array( '/pages/', '.php' ) , array ( '/', '' ), $_SERVER['REQUEST_URI'] );
7         echo "Try this instead: <a href='$url'>$url</a>";
8         die();
9 }
10
11 // Display page content. Any PHP, HTML and YOURLS function can go here.
12 $url = YOURLS_SITE . '/examplepage';
13
14 yourls_html_head( 'examplepage', 'Example page' );
15
16 ?>
17
18 <p>This is an example page. Its URL is simply <?php echo $url; ?></p>
19
20 <?php
21
22 yourls_html_footer();
23