[UPHPU] Storing & Retrieving Invoices
Daniel C.
dcrookston at gmail.com
Fri Nov 10 10:20:23 MST 2006
Hello group,
How do you all store and retrieve customer invoices? I don't see any
reason to keep them in the database since once they're generated,
they're static. And I'd like a way for the customer to get their
invoices without having a hideous URL. i.e.
foo.com/invoices/2006/10/26 is prefferable to
foo.com/invoices.php?y=2006&m=10&d=26. So I'm thinking of doing a
rewrite rule for that, which is fine if I can get it to work (having
trouble currently).
As for storing them, I'm thinking of just writing a static file that
will be retrieved (with safety measures in place to prevent people
accessing invoices/../../../etc/passwd and things like that) when the
page is hit. Which begs the question of how the directory structure
will work. I'm thinking of doing it like this:
storage directory/customer's id/year/month/date.invoice
so customer id 1 would have their 2006/10/26 invoice in this file:
storage directory/1/2006/10/26.invoice
Thoughts? Suggestions?
Thanks,
Dan
More information about the UPHPU
mailing list