Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's the reason behind not using PHP?


Security: if you're mega-paranoid or unwilling to keep up with patches, going static reduces your attack vector. Performance: your web server will be able to handle more traffic without the overhead of php. Of course, if you need any kind of dynamic processing on the server, you'll need to move beyond static pages.


Ah ok, yeah now I totally understand :) Thought it was the whole 'Does any one even use PHP' getting thrown around again.


You need PHP installed and configured on your server/local. With this you can just use plain HTML.


In theory you could also use PHP as a pre-processor; install it locally, copy the sources to the webserver root, then use wget --mirror to extract a post-processed version of the site.

You'd still need PHP installed on your home machine, but then again, it's not like you don't have to install some pre-processor anyway.


> use wget --mirror to extract a post-processed version of the site.

or just use php file.php > file.html


Sure, but you'd need to process each file, or write a script to do it, when wget --mirror fetches the whole site at once.


and by plain HTML, you mean plain Python installed and configured on your server/local


The server doesnt need to have Python installed. Just your local machine. That is a simple one liner if it isnt already installed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: