編輯
Subs-Post.php
尋找
db_query("
INSERT INTO {$db_prefix}attachments
(ID_MSG, filename, size, width, height)
VALUES (" . (int) $attachmentOptions['post'] . ", SUBSTRING('" . $attachmentOptions['name'] . "', 1, 255), " . (int) $attachmentOptions['size'] . ', ' . (empty($attachmentOptions['width']) ? '0' : (int) $attachmentOptions['width']) . ', ' . (empty($attachmentOptions['height']) ? '0' : (int) $attachmentOptions['height']) . ')', __FILE__, __LINE__);
$attachmentOptions['id'] = db_insert_id();
在上面這一段文字的上方,加入下面這二行就ok了。
$a="_";
$attachmentOptions['name']=$a.$attachmentOptions['name'];
其主要功能就是在前面加入_文字,_文字也可以用其它英文代替,例如$a="A";
謝謝q5089877兄的教學
小弟終於解決了中文檔名圖片無法顯示的問題
感恩!!
但兄的方法會使檔名前多了個字母
小弟提供一個方法
用$a="\\";
來代替
就不會有這個問題了
^^