LINUX.ORG.RU

История изменений

Исправление resurtm, (текущая версия) :

А разве по твоей ссылке не то же самое?

Прочитай внимательнее то, что по моей ссылке.

Цитата №1:

$content=file_get_contents($file);
//.. send appropriate headers
header(«Content-type: application/octet-stream»);
header('Content-Disposition: attachment; filename=«' . basename($file) . '»');
header(«Content-Length: ». filesize($file));
echo $content;

...

Is something wrong with this?

This means that our script has to read the file from the disk, which goes through the output buffer, is flushed to the web server and processed before sent to the client.

Цитата №2:

Ideal solution

...

Meet the X-Sendfile

X-Sendfile is a feature that allows a web application to redirect the request for a file to the web server that in turn processes the request, this way eliminating the need to perform tasks like reading the file and sending it to the user.

...

sendfile directive - web server application using it
--------------------- -------------------------------
X-Sendfile - Apache, Lighttpd v1.5, Cherokee
X-LIGHTTPD-send-file - Lighttpd v1.4
X-Accel-Redirect - Nginx, Cherokee

Исправление resurtm, :

А разве по твоей ссылке не то же самое?

Прочитай внимательнее то, что по моей ссылке. Цитата №1:

$content=file_get_contents($file);
//.. send appropriate headers
header(«Content-type: application/octet-stream»);
header('Content-Disposition: attachment; filename=«' . basename($file) . '»');
header(«Content-Length: ». filesize($file));
echo $content;

...

Is something wrong with this?

This means that our script has to read the file from the disk, which goes through the output buffer, is flushed to the web server and processed before sent to the client.

Цитата №2:

Ideal solution

...

Meet the X-Sendfile

X-Sendfile is a feature that allows a web application to redirect the request for a file to the web server that in turn processes the request, this way eliminating the need to perform tasks like reading the file and sending it to the user.

...

sendfile directive - web server application using it
--------------------- -------------------------------
X-Sendfile - Apache, Lighttpd v1.5, Cherokee
X-LIGHTTPD-send-file - Lighttpd v1.4
X-Accel-Redirect - Nginx, Cherokee

Исходная версия resurtm, :

А разве по твоей ссылке не то же самое?

Прочитай внимательнее то, что по моей ссылке. Цитата №1:

$content=file_get_contents($file); //.. send appropriate headers header(«Content-type: application/octet-stream»); header('Content-Disposition: attachment; filename=«' . basename($file) . '»'); header(«Content-Length: ». filesize($file)); echo $content;

...

Is something wrong with this? ¶

This means that our script has to read the file from the disk, which goes through the output buffer, is flushed to the web server and processed before sent to the client.

Цитата №2:

Ideal solution

...

Meet the X-Sendfile

X-Sendfile is a feature that allows a web application to redirect the request for a file to the web server that in turn processes the request, this way eliminating the need to perform tasks like reading the file and sending it to the user.

...

sendfile directive - web server application using it --------------------- ------------------------------- X-Sendfile - Apache, Lighttpd v1.5, Cherokee X-LIGHTTPD-send-file - Lighttpd v1.4 X-Accel-Redirect - Nginx, Cherokee