Saving PHP output as a file


Posted on 16th Feb 2014 07:03 pm by admin

I wondered if anyone knows how to save the rendered output of a PHP script as a file?

I have a script that creates dynamic PDF documents, but want to save it as a file, rather than render it to the browser. could I do something like Code: $file=save_as_file(output('file.php'));
?
(I know the code above is wrong)

No comments posted yet

Your Answer:

Login to answer
229 Like 20 Dislike
Previous forums Next forums
Other forums

how to get values from $_Post with onchange="form.submit();"?
Hi, I have a form that submit to itself with a file upload field and two other hidden field values.<

serializing objects - loses methods - the point being?
Hi

I know that serializing an object will lose the methods. But whats the point in that? What

array_diff weirdness
I'm using the following bit of code

$diff = array_diff($pids, $pidlist);
$diff = array_va

Generate multilayered array from string.
ok so i have a string that looks like this:
Code: [Select]blog:edit_all,delete_all|users:edit_all

Breaking results into week blocks
I have a set of dates (and times), which are returned from a mySQL query.

These usually span

WORDPRESS - Multiple Loops Only Going to One Post?
I have various pages with multiple loops and i need them to be individual to all other categories.

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the

Validating time
Hi Guys

what do you think of the following approach to validate a 24hour time:

http://

Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members kno

Loop Through Date Range
Hi guys,
I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop thro

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash