[thelist] Static Page Generation with PHP

Alex Ezell taranis at spittingllamas.com
Wed Sep 3 11:13:42 CDT 2003


On Wednesday, September 3, 2003, 11:12:12 AM, Sam wrote:

> So, I try and break the pieces of the task off into specialized
> processes. The parser, the aggregation of zip contents (which can be a
> manual process), and the zip creation itself.

> hope this helps a little - I know it's not directly applicable, but my
> lessons learnt might apply: Keep it simple, and allow for manaul 
> intervention at each step. If something breaks or a requirement changes,
> you can still use those parts of the system that function.

That's a very good suggestion. I am writing this application to be
released and installed by others as well as used within our shop. It's
a long way from being solid enough for that but I need to keep an eye
on that as the goal. This suggestion certainly fits in well with that
goal.

>> Ideally, I would like to write all the HTML into a variable or array
>> and then store the files in a ZIP somehow that the user could
>> download. I just can't quite seem to get my heard around how to go
>> about it.

> I'd suggest you write the html to a tmp directory, zip it, remove the
> tmp directory. You can write straight to the zip archive from a 
> variable, but as I say above, my gut is to give yourself an opportunity
> to check the output before building the zip.

Good idea. It would be annoying to have to open the zips everytime to
see if my code worked correctly. Thanks!

-- 
Alex
http://www.spittingllamas.com
"Formal Restrictions, contrary to what you might think,
free you up by allowing you to concentrate on purer ideas."
 - Winter Sorbeck in Chip Kidd's The Cheese Monkeys



More information about the thelist mailing list