заголовок — как сохранить файл документа в PHP?

Это мое example.phpИспользуя это, я создаю файл example.doc и используя заголовок, я могу сохранить этот файл на моем локальном компьютере.

Но я хочу сохранить еще одну копию в доклад папка (report и example.php находятся в одной папке / одном домене)

<?php

$html = preg_replace('%/[^\\s]+\\.(jpg|jpeg|png|gif)%i', 'http://www.asd.com\\0', $html);

print "<html xmlns:v=\"urn:schemas-microsoft-com:vml\"";
print "xmlns:o=\"urn:schemas-microsoft-com:office:office\"";
print "xmlns:w=\"urn:schemas-microsoft-com:office:word\"";
print "xmlns=\"http://www.w3.org/TR/REC-html40\">";
print "<xml>
<w:WordDocument>
<w:View>Print</w:View>
<w:DoNotHyphenateCaps/>
<w:PunctuationKerning/>
<w:DrawingGridHorizontalSpacing>9.35 pt</w:DrawingGridHorizontalSpacing>
<w:DrawingGridVerticalSpacing>9.35 pt</w:DrawingGridVerticalSpacing>
</w:WordDocument>
</xml>
";
print '<h1>hello world</h1>';
header( 'Content-Type: application/msword' );
header("Content-disposition: attachment; filename=example.doc");

?>

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector