Header ("content-disposition:attachment Filename= ". $file _realname=urldecode ($_get[' real ') The file name of the database UrlEncode encoded $file _name=$_get The real file name of the server Header ("content-type:text/html Charset=utf-8 ") Header (' content-disposition:attachment filename= ' Downloaded.txt ') Header ("Content-type:application/octet-stream") The configuration in Tomcat is as follows:įor the above configuration, when access to the extension txt or JPG resources when the download prompt box, if only to some of the mentioned resources to make it appear in the Download prompt box, the above configuration will not work, the solution is to set Content-type in the response header of the resource, for example: Browser open page implementation file download program code (PHP/JSP/JAVA) There are students who need to learn to refer to.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |