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

Posted by jukka on 01/11/06 18:06

Andrew wrote:
> hi Jukka - thanks for your reply. The only problem is that I have
> multiple files? So the first line of the code would not work? There are
> about 15 files that all use hardwarereviewsdisplay.php to load the
> template, whereas "intel670processor.htm" to speak, holds the review
> information. Can it still be done?
> cheers,
> Andrew
>
Ofcourse, you have already defined the path in the variable. What I'm
saying is:
$file = 'path/to/hardware/intel670processor.htm';
is actually:

$page = $_GET["page"]; // hardware/intel670processor

$rewritten = your_rewrite_function($page)
// hardware/inte670processor.htm

$file = "docs/reviews/$rewritten";
// docs/reviews/hardware/intel760processor.htm (path to the file) :)

And if your rewrite rule returns just intel670process.htm you could use
$file = "docs/reviews/hardware/$rewritten"; (you know, whatever your
path to your hardwaredocs is.

Ask if further assistance is needed. :)

 

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

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