![]() |
附件檔名錯誤修正方法
編輯newattachment.php
搜尋 代碼: foreach ($_FILES AS $upload => $attachment) { $attachcount++; 替換成 代碼: $attnum = 1 ; foreach ($_FILES AS $upload => $attachment) { $attachcount++; $attachment['name'] = $_POST["fname".$attnum]; $attnum++; 搜尋 代碼: $attachinput .= "<input type=\"file\" class=\"bginput\" name=\"attachment$boxcount\" />\n"; 下面增加 代碼: $attachinput .= "<input type=\"hidden\" class=\"bginput\" name=\"fname$boxcount\" />\n"; $jsatt .= "var Ary = document.newattachment.attachment$boxcount.value.split('\\\')\n"; $jsatt .= "document.newattachment.fname$boxcount.value=Ary[Ary.length-1]\n"; 編輯模板newattachment 搜尋 代碼: function verify_upload(formobj) 上面增加 代碼: function validate() { $jsatt return true; } 搜尋 代碼: <form enctype="multipart/form-data" action="newattachment.php" name="newattachment" method="post" > 改成 代碼: <form enctype="multipart/form-data" action="newattachment.php" name="newattachment" method="post" onsubmit="return validate()"> 搞定 收工 |
所有時間均為台北時間。現在的時間是 12:51 AM。 |
Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2025, Jelsoft Enterprises Ltd.
『服務條款』
* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *