普通网友 2016-01-19 05:28
浏览 37

PHP如何在我的网站标题上使用我的分页名称

Back to : 2016 Download > HD 2016 Videos > Collection 1

Please see that image sample

enter image description here

I want Main page title like this

MyWebSite.Com : 2016 Download HD 2016 Videos Collection 1 ... Free Downloads , Video Downloads

my Page title code

  <?php
$mt=microtime(1);
require 'config.php';
require 'func.php';


//Sorting and previe:



$p=intval($_GET['p']);
$sort=intval($_GET['sort']);
if($sort>0 OR $sort<0)
{$sort=1;}

//Folder:
$dir=htmlspecialchars($_GET['dir']);

while(substr($dir,0,1)=='/')
{$dir=substr($dir,1,strlen($dir));}

if(strstr($dir,'..') OR !is_dir('load/'.$dir) OR strstr($dir,'://'))
{
$dir=null;
}

$opis = false;

$dir_exp=explode('/',$dir);
header('Content-type: text/html; charset=utf-8');
header('Cache-control: no-cache');
print '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>


<title>'.transdir($dir_exp[count($dir_exp)-1]).' Downloads</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
<meta name="author" content="mobizone" />
<meta name="subject" content="mobizone" />
<meta name="Robots" content="INDEX,FOLLOW" />


<link rel="stylesheet" href="styles.css" type="text/css" />
</head>

My Pagination Code

//Pagination:
if($countstr>1)
{echo '<div class="page" style="text-align:left">';
print nav_page($countstr,$page,$dir,$p,$sort,'index'); echo'</div>';}
$dir_exp=explode('/',$dir);
if($dir){print '<div class="head"><a href="index.php">Home</a> ';}
if(($countj=count(explode('/',$dir)))>1){
$j=explode('/',$dir);
for($i=0; $i<=$countj; $i++){
$u=$j[count($j)-2];
if($u){
unset($j[count($j)-1]);
$g[$i]= ' &#187; <a href="index.php?dir='.join('/', $j).'&amp;p='.$p.'&amp;sort='.$sort.'">'.transdir($u).'</a>';}}
for($i=count($g)-1; $i>=0; $i--)
{print $g[$i];}}
if($dir){echo ' &#187; '.transdir($dir_exp[count($dir_exp)-1]).' </div>';}
if(!$dir)
{
include 'solid.php';
}
include 'foot.php';
print'</body></html>';
?>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
    • ¥500 52810做蓝牙接受端
    • ¥15 基于PLC的三轴机械手程序
    • ¥15 多址通信方式的抗噪声性能和系统容量对比
    • ¥15 winform的chart曲线生成时有凸起
    • ¥15 msix packaging tool打包问题
    • ¥15 finalshell节点的搭建代码和那个端口代码教程
    • ¥15 Centos / PETSc / PETGEM
    • ¥15 centos7.9 IPv6端口telnet和端口监控问题
    • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作