You are here: Re: Dynamic <title> in PHP? « All PHP « IT news, forums, messages
Re: Dynamic <title> in PHP?

Posted by Andrew on 01/12/06 03:18

Hi Jukka,
if I'm following this correctly, hardwarereviewsdisplay.php
contains the following code at the top:

<?php
$file = 'hardware/'; //assuming you've already formatted the page=
variable
$handle = fopen($file,"r");
$file_text = fread($handle, filesize($file));
$temp_title = strstr($file_text, "<title>"); //everything from <title>
onwards
$title_end = strpos($temp_title, "</title>");
$title = substr($temp_title, 7, $title_end-7);
fclose($handle);
?>

<html>
<head>
</head>

<?php
print "<title>$title</title>"; //print intel670processor.htm's title in

hardwarereviewsdisplay.php
<?php

Which would read the <TITLE> tag from intel670process.htm?

cheers,
Andrew

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация