Home >Backend Development >PHP Tutorial >Add website name before attachment name_PHP tutorial

Add website name before attachment name_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:53:34824browse

When downloading an attachment, add the website name before the attachment name. That is to say, when downloading to the local computer, the website name is added to the file name
When you register for download, the Script House Forum download will appear - the suffix is ​​the attachment name


1 include/attachment.func.php: Copy content to clipboard
Code:
while($attach = $db->fetch_array($query)) {2 attachment.php: Copy Content to clipboard
code:
if($attach = $db->fetch_array($query)) {Add the code to copy content to clipboard below the above two places: Copy content to clipboard
code :
$attach['filename'] = 'Architecture Internet Forum Download - '.$attach['filename']; Of course, replace Script Home Download with your own site name

Explanation: It was Xi Ming who helped!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318662.htmlTechArticleWhen downloading an attachment, add the website name before the attachment name, which means that when downloading to this machine, the file name will be added When you register and download the website name, the Script House Forum download will appear - the last name is the attachment name 1i...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn