-1

I want to change default download location in php Using header function I cant' find a parameter for that This is the definition of header

header(string $header, bool $replace = true, int $response_code = 0)

Edit: URL of solution Save current page as HTML to server

<?php
// Start the buffering //
ob_start();
?>

Your page content

<?php
echo '1';
file_put_contents('yourpage.html', ob_get_contents());
?>

Instead of yourpage.html you specifiy the path and it works Is there any solution for header or other alternative to just change default download location Thanks

1 Answers1

-2

URL of solution Save current page as HTML to server

<?php
// Start the buffering //
ob_start();
?>

Your page content

<?php
echo '1';
file_put_contents('yourpage.html', ob_get_contents());
?>

Instead of yourpage.html you specifiy the path and it works