forked from 20xd6/simple_blog
parent
206f94f5db
commit
5016fa8ce8
@ -2,20 +2,11 @@
|
|||||||
<html lang="en-US">
|
<html lang="en-US">
|
||||||
<?php
|
<?php
|
||||||
//Sets the page title based on the name of the current directory
|
//Sets the page title based on the name of the current directory
|
||||||
function Title() {//Needs cleanup.
|
function Title() {
|
||||||
//~ $new_title = $_SERVER['REQUEST_URI'];
|
|
||||||
|
|
||||||
//~ $new_title = preg_replace("/^^\//i", "", $new_title);
|
|
||||||
//~ $new_title = preg_replace("/\//i", "", $new_title);
|
|
||||||
//~ $page_title = $_SERVER['REQUEST_URI'];
|
|
||||||
//~ $page_title = preg_replace("/^(.*)\//i", "", $page_title);
|
|
||||||
$page_title = basename($_SERVER['SCRIPT_FILENAME'], '.php');
|
$page_title = basename($_SERVER['SCRIPT_FILENAME'], '.php');
|
||||||
//~ echo($page_title);
|
|
||||||
if(strtolower($page_title) == 'index'){
|
if(strtolower($page_title) == 'index'){
|
||||||
parse_str($_SERVER['REQUEST_URI'], $page_uri);
|
parse_str($_SERVER['REQUEST_URI'], $page_uri);
|
||||||
$page_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
$page_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||||
//~ echo($page_path);
|
|
||||||
//~ $folder_name = sizeof($page_path);
|
|
||||||
$folder_name = explode("/", trim($page_path, "/"));
|
$folder_name = explode("/", trim($page_path, "/"));
|
||||||
$page_title = $folder_name[(sizeof($folder_name) - 1)];
|
$page_title = $folder_name[(sizeof($folder_name) - 1)];
|
||||||
} elseif(strtolower($page_title) == 'homepage'){
|
} elseif(strtolower($page_title) == 'homepage'){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user