Answer the question
In order to leave comments, you need to log in
How to select all extended latin characters in one fell swoop?
The text contains characters like these:
önwë㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮį
...
I tried to add all the characters from this table
But it didn’t help, there are characters with other codes, for example
ú
Answer the question
In order to leave comments, you need to log in
Source on Habré :
function file_force_download($file) {
if (file_exists($file)) {
// сбрасываем буфер вывода PHP, чтобы избежать переполнения памяти выделенной под скрипт
// если этого не сделать файл будет читаться в память полностью!
if (ob_get_level()) {
ob_end_clean();
}
// заставляем браузер показать окно сохранения файла
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
// читаем файл и отправляем его пользователю
if ($fd = fopen($file, 'rb')) {
while (!feof($fd)) {
print fread($fd, 1024);
}
fclose($fd);
}
exit;
}
}
We need to send the correct headers to the browser.
There was already a similar question: How to display the received stream from PDF by curl?
$fileDescriptor = fopen('/path/to/file', 'w+');
curl_setopt($curl, CURLOPT_FILE, $fileDescriptor);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question