You are here: Re: Pulling Title Tag out of HTML « PHP Programming Language « IT news, forums, messages
Re: Pulling Title Tag out of HTML

Posted by Geoff Berrow on 03/03/07 02:26

Message-ID: <1172871036.728685.248460@v33g2000cwv.googlegroups.com> from
affiliateian@gmail.com contained the following:

>Any ideas?

<shrug>It works on my machine

You have to learn to debug code. Work through it so you understand it
and echo the variables to make sure they contain what they should.
>
><?php
//assigns the script uri to the variable $url. echo it out to check
>$url=$_SERVER['SCRIPT_URI'];
//splits the uri into sections and creates an array of the pieces.
>$file=explode("/",$url);
//use print_r($file) to see what it contains

//get the last piece. This should be the file name or the page we are on
>$filename=$file[(count($file)-1)];
>echo $filename . "<br>\n";
/you echoed it. Was it what it was supposed to be?
//If it's not the filename of the page we are on
//then that's why implode will fail
>echo "<pre>\n";
>print_r(file($filename));
>echo "</pre>\n";

//the next line gets the contents of the file and puts it
//into a string called $content so we can do the matching
//
>//$content = implode('', file($filename));
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

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

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