需要打印的页面中的文件内容和存储这些结果的文本文件,我已经写了显示文件内容 形式PHP脚本下面输出保存在一个文本文件
给出下载的格式<form action="newfile.php" method="post" enctype="multipart/form-data">
<input type="file" name="file" size="50" maxlength="25"> <br>
<input type="submit" name="upload" value="Upload">
PHP脚本是
$file=$_FILES['file']['tmp_name'];
$result = file_get_contents($file);
print $result;
将打印的文件内容,但我怎么能其结果保存在txt文件格式,以及如何下载,或在我们的机器上保存它
请给我提供一个解决方案来保存它的结果.txt格式
[move_uploaded_file(http://php.net/manual /en/function.move-upload ed-file.php) –