PHP header attach AVI-file
问题 I'm trying to make a PHP script to download an AVI-file. The file is on my server and I want to send it to the user. I have made the following script but when I run it, I will only get a 0 KB large AVI file. Can anyone tell me what I am doing wrong? $file_path = "downloads/test.avi"; // Get filename $filename = explode("/", $file_path); $filename = $filename[count($filename)-1]; if(file_exists($file_path)) { $file_extension = strtolower(substr(strrchr($file_path, "."), 1)); // This will set