GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   question about an echo (https://gfy.com/showthread.php?t=412234)

Wolfy 01-04-2005 09:11 AM

question about an echo
 
Good Morning GFY!

I need to do a search and replace acoss a ton of files, and what I want to do is echo the individual file name in the <title>(echo file name)</title>... Anybody know how to do this?

tolik 01-04-2005 09:17 AM

morning.... 6:16 pm - unfuckable morning, should i note

http://bignosebird.com/sdocs/echo.shtml

set handler for parse html as shtml if you need .html files

bet, i know what you planning to do ;)

Wolfy 01-04-2005 09:28 AM

Quote:

Originally Posted by tolik
morning.... 6:16 pm - unfuckable morning, should i note

http://bignosebird.com/sdocs/echo.shtml

set handler for parse html as shtml if you need .html files

bet, i know what you planning to do ;)

Cool stuff on that page, but if my answer was there I didn't see it. I saw where I could echo the url of the document, but then my title would be
"http://www.bliggityblah.com/folder-name/category-name/page-name.php plus a few other items" ....

That ends up bieng too long. I need to only echo
"file-name.php"

tolik 01-04-2005 09:37 AM

i dont see where your problem


<!--#echo var="REQUEST_URI"-->

but it be display /file-name.php

from other side - if you using php pages - read env REQUEST_URI remove / and print between <title></title>

tolik 01-04-2005 09:42 AM

ops, forgot - it be show path from domain root - not only file - /folder-name/category-name/page-name.php

but split this in php by /

Wolfy 01-04-2005 09:44 AM

Tolik, thanks for the help - have you seen "Finding Nemo"? There's one part, where the fish are getting ready to exit the East Australian Current, and the little turtle is giving instructions, and at the end of the speech the clown fish, with a bewildered look on his face, exclaims - "It's like he's trying to speak to me, I know it!!!"


I'm trying to say I just don't get what you are saying :winkwink:

As I am doing a find/replace, I need to do find this
<title>
And replace with
<title>(tell me this code please!)

I am leaving out the close title tag because some of the pages have a few key words in them already, so the end result will be <title>page-name.php original text</title>.

And yes, it is for php, if that matters in this instance.

tolik 01-04-2005 09:50 AM

i not familar with php - only perl scripts

how it should be - any php related person do it in minute

$q=getenv("REQUEST_URI");

and after this - split by / to hash
last element in hash - your file name. just print it between <title>$filename your text</title>

Wolfy 01-04-2005 09:58 AM

All right, thanks for your help. I'm sure what you are telling me will work, but it's skipping past a few things that aren't clicking in my brain for some reason, I probably just worked too late yesterday. I'll figure it out.

TheMob 01-04-2005 11:39 AM

go to php's site..

simple

http://php.net/echo


All times are GMT -7. The time now is 12:37 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123