Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

How to? HTML

Name: Anonymous 2007-01-20 22:55

I know HTML isn't really a programming language, but this is the most appropriate place I figured I'd post...

I want to do a series of webpages that look like this:

[Title]
[Generic blahblah]
[Specific blahblah]

In each webpage, the generic blahblah is the same.  What I want to do, if that's possible, is have that generic blahblah get stored on a page of its own, and embedded into the specific pages.  This way, if I need to update the generic stuff, I only have to do it once instead of for each page I got where it appears.

Trouble is, my knowledge of HTML is feeble...  So rather than become an hero, I thought I'd try myself on /prog/ and read Anonymous' opinion on the task at hand.

Name: Anonymous 2007-01-20 23:40

use PHP and the function include(name of file) or require(name of file) to output the repeated parts of the page

Name: Anonymous 2007-01-21 1:05

you can also look into something called SSI for a simpler solution that php

Name: Anonymous 2007-01-21 3:10

Name: Anonymous 2007-01-21 3:36

lol, i wont say that ssi isn't simple, but how hard is it to take a web page,  drop it between opening and closing php tags and calling include()

Name: Anonymous 2007-01-21 3:37

STFW

Name: Anonymous 2007-01-21 8:32

>>2
>>3
>>4

Thanks!  I'll look into that.

Name: Anonymous 2007-01-21 11:26

>>2
I second that (and will read about SSI but it's harder than <?php include('bar');?>)

Name: Anonymous 2007-01-21 12:48

SSI is probably faster than PHP, tho.
why not use javascript (XMLHttpRequest + DOM) to do it?

Name: Anonymous 2007-01-21 13:19

just dont use mod_perl and you'll be fine

Name: Anonymous 2007-01-21 17:04

I use make and m4 to assemble fragments into my Web pages.

Name: Anonymous 2007-01-21 18:23

>>8
SSI is as simple as <?php include 'bar';?>, though if you know the later and not the former, you have a reason to use the later.

>>9
SSI is probably 12 microseconds faster.Z

>>11
GNU guy

Name: Anonymous 2007-01-21 18:56

>>12
10000 requests * 12 microseconds

Name: Anonymous 2007-01-21 20:04

>>13
how do i cached page

Name: Anonymous 2007-01-22 5:54

>>13
Never at the same time. With all respect, do you really think any of us' websites could get that activity? Ten fucking thousand requests at once? Not even porn sites get that.

Name: Anonymous 2007-01-22 8:35

>>15
i used to run a site that got 5000-15000 requests per hour (depending on time of day)... and that was a site that i tried to keep from becoming too popular...

Name: Anonymous 2007-01-22 11:03

>>16
Per hour, not simultaneous.

Name: Anonymous 2007-01-22 15:15

>>16
Simultaneous, not per hour.

Name: Anonymous 2007-01-22 17:31

>>18-17
my point is that if i tried to advertise the site, i'd probably be getting that much activity by now.

Name: Anonymous 2007-01-22 19:45

i used to maintain a site with my penis it was hard

Name: Anonymous 2007-01-23 4:22

>>19
Did you feature Japanese girls in school uniforms?

Name: Anonymous 2007-01-24 10:56

>>19
What kind of site? I'm guessing something illegal. >.>

Name: Anonymous 2007-01-24 14:18 (sage)

>>22
no, nothing illegal... i'm not going to say what kind of site, tho... i don't want anyone to steal the idea before i can get enough bandwidth (and a more powerful server) to handle that much activity...

Name: Anonymous 2007-01-24 16:43

>>23
I knew it was illegal.

Name: Anonymous 2007-01-25 4:31

>>1
I used a simple javascript to archive this years ago before I had heard of php, basically just a whole lot of "document.write"s. That might work if your host doesn't have PHP or SSI

Name: ​​​​​​​​​​ 2010-10-25 7:55

Name: Anonymous 2010-12-17 1:39

Erika once told me that Xarn is a bad boyfriend

Name: Sgt.Kabu烵kimanꙀꑨ 2012-05-28 22:03

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List