1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yourls_ynh.git synced 2024-09-03 20:35:59 +02:00
yourls_ynh/sources/pages/examplepage.php

24 lines
578 B
PHP
Raw Normal View History

2014-06-11 18:19:02 +02:00
<?php
// Make sure we're in YOURLS context
if( !defined( 'YOURLS_ABSPATH' ) ) {
// Attempt to guess URL via YOURLS
$url = 'http://' . $_SERVER['HTTP_HOST'] . str_replace( array( '/pages/', '.php' ) , array ( '/', '' ), $_SERVER['REQUEST_URI'] );
echo "Try this instead: <a href='$url'>$url</a>";
die();
}
// Display page content. Any PHP, HTML and YOURLS function can go here.
$url = YOURLS_SITE . '/examplepage';
yourls_html_head( 'examplepage', 'Example page' );
?>
<p>This is an example page. Its URL is simply <?php echo $url; ?></p>
<?php
yourls_html_footer();