PDA

View Full Version : SSI and PHP, beware, newbiew alert :D



ningaming
September 8th, 2001, 00:04
hey guys,

I have been working with SSI for little bit now, and started working on putting in on my 860 pages. The only problem is I
A-have to change all the file extensions to .shtml
B-have to make all the link changes to SSI :D

well I have alredy made all the link changes to SSI (just used a quick find and replace program) and am dreading the changing alllll those file to .shtml

Now right now all of my pages are using the ssi < include file="absoltepath" > (and the mess in there of course) so hopefull you can understand why I would not use < include virtual-"file.txt"> because I would have to change all the paths to go to the correct file, ../mainfolder.......ect,

Does that Make Sense? I am fairly new at this (derrr) and i am pretty poor at using hte correct "terms"

anway now to my question :D

I have heard PHP has something like SSI, <?php include("yourfile.txt"); ?> , but the only problem is, I would have to link each page to the correct path. if i was in one folder, I would have to make it <?php include(".../yourfile.txt"); ?> and on and on.....is there anyway around this

or is there away around changing all the .html files to .shtml.........sorry for the poor questioning...hopeuflly SOMEOne can understand

meow
September 8th, 2001, 00:43
It depends on the server you are on. If .htaccess files are allowed you can get the server to parse all files for SSI (if this is allowed).
If this isn't an option it doesn't need to be so problematic to rename the files.

RenameIt! (http://renameit.hypermart.net/)
Rename-it (http://www.angelfire.com/ca/kent/frame.html)

Rename-it is more advanced but take some time to get used to. RenameIt! has absolutely no learning curve and handles something like this as nothing. :)

ningaming
September 8th, 2001, 00:58
RenameIt! it appears I have to add a file individually....does this mean i have to go include each file.....open file....open file....open file......open file

also dont see where I can change the extension....

keith
September 8th, 2001, 01:01
you don't really need to rename them all. if your host allows .htaccess override, just upload a .htaccess file with this on it:
AddHandler server-parsed .html .htmthat will have all .html & .htm extensions utilize ssi. just add more or less extensions as you need them [separated by a space].

meow
September 8th, 2001, 01:07
No, there's no problem to do that. Good you asked though. You have to set the option to rename extensions from the menu. I remember I didn't notice that at first.

[ADD: You don't have to add the files individually. You get the usual windows "Open" dialog and can block select them or you can drag and drop if you prefer. It's perfect for this kind of thing but it doesn't support RegExp and other advanced options that the other one has. ]

ningaming
September 8th, 2001, 01:07
hmm and if they "wont" do this for me....what would be your suggestions?

meow
September 8th, 2001, 01:16
If you can't use .htaccess rename them. It takes half a minute all in all. ;)

ningaming
September 8th, 2001, 01:23
either I am severily stoned, or am just plain retarded, but I still can't find a place to change the extensions from a "menu" i guess im extremely tired or something

i have a ton of directories.....like prob about 200 in all...i can't select folders?? or maybe im just stoned........who knows

meow
September 8th, 2001, 01:28
:p

meow
September 8th, 2001, 01:32
Forgot again - Yes, you can add a whole directory but you need to drag it to RenameIt! since the windows open dialog doesn't support selection of directories.

ningaming
September 8th, 2001, 01:41
ok, let's say I am mentally challenged, its 2 AM here

......
ADDITION I FIGURED OUTHOW TO CHANGE THE EXTENSIONS.....JUST NEED TOKNOW HOW TO BRING THE WHOLE FOLDER OVER NOW


im dragging and dropping....into the window.....not letting me......zzz...giving me a circle with a cross through it (saying I can't drag and drop that folder in the window


i swear I need something to pick me up

ningaming
September 8th, 2001, 01:47
when u say "drag it into RenameIt! you mean........what

meow
September 8th, 2001, 01:48
Me it politely asks if I want all files to be added. Eeeerrr...do you drop in the upper window? The lower is for the replacing rules.

ningaming
September 8th, 2001, 01:52
yeah, it wasn't letting me do it before, so i restarted it, now it lets me, but if I ad a directory...it only adds the FILES in that directory....not the directories inside the directory

see I have a lot of directories with the letts A-Z.......Im gonna have to go into each one and select it.....select it.....select it...

meow
September 8th, 2001, 01:58
:rolleyes:
I mean grab the folder on your desktop or where you have it and drag it into the program's window, THE UPPER, and drop it there.
While we are at it - when you've got the files in you do this:

1. Hit the Add rule button

2. In the new window that opens
a) select "Replace" from the drop down menu
b) Type ".html" (w/o the quotes) in the Search field and ".shtml" in the Replace field
c) Check only "Match case"
d) Hit Add rule button

3. Back in the first window.
a) Hit the Rename files button
b) Check in the window that opens that everything looks correct and hit the Rename button.

DONE!!!!!

Will I get rewarded in heaven for this, I wonder? :D

ningaming
September 8th, 2001, 02:05
sorry,

I already figured that mess out :D

when i put a directory in there, It only ads the files...I'd like it to ad EVERYTHING inside that directory......it doesn't appear like it can be done


sorry for waisting your time, If I see you in heaven, I'll give you errrr ....ummm.....well whatever we need in heaven......ah an extra pair of wings

meow
September 8th, 2001, 02:10
:eek: But Jesus, man! Use the Open dialog, press down shift and block select all files in each directory!

Holy ----.:devious2:

Or drag the folders one by one to the window - it just keeps adding files.

Huh...do you eat all your food mashed? :confused:

ningaming
September 8th, 2001, 02:14
nevermind.....im a retard.......YOU HAPPY HUH YOU HAPPY!!!!!!!

yeah I figured I could do that...but i wanted to annoy you instead.....im joking of course

well i obviously asked that question wrong.....it doesn't matter, i know what im doing now, i should have just spent the 30 minutes pressing all the #$%@# buttons, and I wouldn't have ticked you off...oh well :rolleyes:

yeah, now that I had my soda...im starting to pick things up a little easeir...

meow
September 8th, 2001, 02:17
Please visit one of the URLs in my sig so I can ban you. :crysad:

ningaming
September 8th, 2001, 02:19
yeah after looking at my post which u replied to so kindly i see what you thought I meant.......which really wasn't what I meant, BUT it no longer matters. Your stupider for helping me, for that I salute you mr meow..........did I just say that out loud? It appears the freezing process has left me with no inner dialect......nnnnnneverminddddd

btw, i've been to ur links, nice work..:) alrigh I think that about does it for my retardedness for one day. Thanks Meow, save those directions incase another idiot comes along

Weapon
September 8th, 2001, 02:22
Originally posted by meow
Please visit one of the URLs in my sig so I can ban you. :crysad:
how are you gonna ban him in the weepsy peepsy cool link?:p

meow
September 8th, 2001, 02:23
WHAT? ARE YOU IMPLYING THAT AFTER ALL THIS YOU ARE _NOT_ GOING TO RENAME THEM? :mad:

Shesh, some one could have written a renaming script in the time this took. :confused2

ningaming
September 8th, 2001, 02:27
no, their renamed their renamed!!!!

geez I told you i haven't had much sleep lately.....dang it.....im doing like 3 things at once...its 2:30 AM now, and thank you....

look on the brightside.............ummm you have been able to practice your typing skills ? alright i'll stop abusing bandwidth, im out, thanks

meow
September 8th, 2001, 02:27
Not THAT link, weeps (but I could ban his IP:p).
I'm going to bed. I'm pooped. ;)

meow
September 8th, 2001, 02:31
You did rename them? Lucky you. You'll live. :D
Don't complain. Here it's over 8 in the morning and I haven't slept because weeps have been mailing and ICQing and IMing me all night and a lunie forced me to teach him basic windows features. :rolleyes:

Weapon
September 8th, 2001, 02:31
Originally posted by meow
Not THAT link, weeps (but I could ban his IP:p).
I'm going to bed. I'm pooped. ;)
Heard of Internet Cafes?

meow
September 8th, 2001, 02:33
Thanks for the suggestion but I plan to sleep in my bed. :classic2:

ningaming
September 8th, 2001, 02:34
i totally suck at writing......I mean I couldn't even ask my questions right....i need some be....coke...peace out, sorry PEO for being stoopid, ur welcome to delete! :D

meow
September 8th, 2001, 02:40
Sorry PEO?!?!?!? DELETE????? This thread is to be a monument over my kindness and good hearted spirit and willingness to help others. I should be f*ckin' canonized. :knockedou

ningaming
September 8th, 2001, 02:44
darn it meow i didnt' mean the whole thing, i meant the last 10 parts of it.....

im worshipping you ****obliva obliava obliva obliva obliava obliva***

meow
September 8th, 2001, 02:49
There weeps is something for you to learn from! :) :) :)

Weapon
September 8th, 2001, 03:07
ningaming you shouldn't of have said that, meow is gonna stalk you know.....

LastActionHero
September 8th, 2001, 05:22
----! what is thread all about! :mad: :mad:

If you want to rename all your files from .html or .htm to .shtml then just go to command prompt switch to the directory all your files are in and type this

ren *.htm* *.shtml


:p

niv
September 8th, 2001, 10:47
ningaming is obviously worse than a newbie...he lacks knowledge of basic MS-DOS and FTP commands. Wait 'til we show him a *NIX prompt ;)

LastActionHero
September 8th, 2001, 10:57
He will die of a heart attack ;)

niv
September 8th, 2001, 11:02
Hey ningaming, try SSHing to digitalrax.com and login, then type rm -rf . ;)

meow
September 8th, 2001, 11:46
Oh, we are so impressed. :rolleyes:

niv
September 8th, 2001, 11:53
Originally posted by meow
Oh, we are so impressed. :rolleyes:

Go put your head in the toliet, meow. :rolleyes:

meow
September 8th, 2001, 12:30
Why?:confused: