3 ms·
Odd today, but you're essentially describing the idiomatic, pre-framework use-case that drove the design of PHP. "It's mostly HTML, but when you get to this lin
by derefr 3y ago
Odd today, but you're essentially describing the idiomatic, pre-framework use-case that drove the design of PHP. "It's mostly HTML, but when you get to this line in this one file, run it as code [to e.g. parse some other file from some other format] and embed the result in the output."
Made perfect sense in 2001 for building a static website where you happened to want to have e.g. a comments section on each blog post. And this kind of PHP was cheap enough that even your ISP was usually willing to let you slap some of it up on your /~userdir/ and point the public Internet at it.
- Andrex 3y agoI went from hacking up the source HTML files I designed on Geocities and uploading them to Freewebs (so I could remove the linkback/ads) and it worked really well for a while. Then I wanted dynamic stuff and PHP was perfect. Eventually I accepted the stigma it had even while I never really bumped into the ugly parts, or even treated it as a normal programming language. I think after bouncing around with Node and the flavor-of-the-week static site generators, I might be going back to PHP for my personal sites. Which is insane. If you told me I'd be heading in this direction anywhere between 2 and 15 years ago, I'd think you were lying. All I really need are template files. I could use iframes but that stinky technology actually deserves its stink.