You want to physically create a file rather than sending the output back to the browser?
A shell access method:
Code: Select all
system('php thescript.php > thehtmlfile.html');
A 100% PHP method:
Code: Select all
$data = file_get_contents('http://localhost/thescript.php?args=values'); //http portion in tact so apache runs it
$handle = fopen('thehtmlfile.html', 'w');
fwrite($data, $handle);
fclose($handle);
EDIT | Addeell access method:
Code: Select all
system('php thescript.php > thehtmlfile.html');
A 100% PHP method:
Code: Select all
$data = file_get_contents('http://localhost/thescript.php?args=values'); //http portion in tact so apache runs it
$handle = fopen('thehtmlfile.html', 'w');
fwritocalhost/thescript.php?args=values'); //http portion in tact so apache runs it
$handle = fopen('thehtmlfile.html', 'w');
fwrite($data, $handle);
fclose]
system('php thescript.php > thehtmlfile.html');
A 100% PHP method:
Code: Select all
$data = file_get_contents('http://localhost/thescript.php?args=values'); //http portion in tact so apache runs it
$handle = fopen('thehtmlfile.html', 'w');
fwrite($data, $handle);
fclose($handle);
[/php:1:f502g the output back to the browser?
A shell access method:
Code: Select all
system('php thescript.php > thehtmlfile.html');
A 100% PHP method:
Code: Select all
$data = file_get_contents('http://localhost/thescript.php?args=values'ally create a file rather than sending the output back to the browser?
A shell access method:
Code: Select all
system('php thescript.php > thehtmlfile.html');
A 100% PHP method:
Code: Select all
$data = file_get_contents('httally create a file rather than sending the output back to the browser?
A shell access method:
Code: Select all
system('php thescript.php > thehtmlfile.html');
A 100% PHP method:
Code: Select all
$data = file_get_contents('http://localhost/thescript.php?argthod:
Code: Select all
system('php thescript.php > thehtmlfile.html');
A 100% PHP method:
Code: Select all
$data = file_get_contents('http://localhost/thescript.php?args=values'); //http portion in tact so apache runs it
$handle = fopen('thehtmlfile.html', 'w');
fwrite($data, $handle);
fclose($handle);
EDIT | Added some examples.
system('php thescript.php > thehtmlfile.html');
A 100% PHP method:
Code: Select all
$data = file_get_contents('http://localhost/thescript.php?args=values'); //http portion in tact so apache runs it
$handle = fopen('thehtmlfile.html', 'w');
fwrite($data, $handle);
fclose($handle);
EDIT | Added some examples.