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