Search
 
SCRIPT & CODE EXAMPLE
 

PHP

download file using jquery php

header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.$_REQUEST['f']);
readfile('../some_folder/some_subfolder/'.$_REQUEST['f']); 
exit;

//You open this php-file via 
window.location.href = 'scripts/this_php_file.php?f=downloaded_file';
Comment

PREVIOUS NEXT
Code Example
Php :: get array value in php 
Php :: laravel request file empty 
Php :: WordPress Plugin Definition 
Php :: add slashes to string 
Php :: time characters php 
Php :: php mysqli insert name adress 
Php :: seo_url.php location opencart 
Php :: hex2bin (PHP 5 = 5.4.0, PHP 7, PHP 8) hex2bin — Decodes a hexadecimally encoded binary string 
Php :: console.log for php 
Php :: fallo al conectar al servidor ftp wordpress 
Php :: php public folder 
Php :: php language is used for 
Php :: php if in database field exists, if exists update, if not create 
Php :: swagger laravel 
Php :: php sentense case 
Php :: php assign an array inside a foreach loop 
Php :: PHP Parses a time string according to a specified format 
Php :: Laravel 8 Auth Scaffolding using Inertia Jetstream 
Php :: wpmu create user 
Php :: Find category name & link 
Php :: laravel copy image 
Php :: add class to row laravel 
Php :: + php quantifer 
Php :: @admin @endadmin 
Php :: ?: php 
Php :: In QueryRecorder.php line 22: Argument 2 passed to FacadeIgnitionQueryRecorderQueryRecorder::__construct() must be of the type bool, null given, 
Php :: upgrade php 7.3 to 7.4 
Php :: laravel redis sentinel 
Php :: PHP-cs-fixer: Executable Path Windows 
Php :: laravel filesystem 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =