comp90
شنبه 08 مهر 1396, 15:54 عصر
سلام ودرود:
بنده با استفاده از کدهای زیر می خواهم اقدام به دانلود یک فایل mp4 کنم تا پیش از اینکه سایت تبدیل به https شود کار می کرد اما از زمانی که https فعال شده فایل دانلود میشه اما پسوند اون از دست میره و فقط یک فایل دانلود میشه اما هیچ پسوندی نداره که اجرا بشه.
header('Content-Description: File Transfer');
header('Content-Type: ' . 'video/mp4');
header('Content-Disposition: attachment; filename=' . "test");
header('Content-Type: application/octet-stream');
header('Content-Transfer-Encoding: binary');
header('Connection: Keep-Alive');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize("test.mp4"));
ob_clean();
flush();
readfile("test.mp4");
بنده با استفاده از کدهای زیر می خواهم اقدام به دانلود یک فایل mp4 کنم تا پیش از اینکه سایت تبدیل به https شود کار می کرد اما از زمانی که https فعال شده فایل دانلود میشه اما پسوند اون از دست میره و فقط یک فایل دانلود میشه اما هیچ پسوندی نداره که اجرا بشه.
header('Content-Description: File Transfer');
header('Content-Type: ' . 'video/mp4');
header('Content-Disposition: attachment; filename=' . "test");
header('Content-Type: application/octet-stream');
header('Content-Transfer-Encoding: binary');
header('Connection: Keep-Alive');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize("test.mp4"));
ob_clean();
flush();
readfile("test.mp4");