|
 |
|
รบกวน แอด หน่อยครับ เกี่ยวกับ บทความ CKEditor กับ Plugin Upload Image แทรกรูปภาพ สามารถนำไปใช้งานได้ทันที |
|
 |
|
|
 |
 |
|
นั่นแหละครับ ที่ผมว่า คุณจะต้องมีปัญหากับการอัพโหลดรูปอีกพอสมควรเลย เราต้องเข้าไป config ที่อยุ่ไฟล์ด้วยครับ ดูให้ดีครับว่าไฟล์ที่เราอัพนั้น มันไปอยู่ที่ไหน ผมเคยเจอครับ ไฟล์รูปที่อัพโหลด ดันไปอยู่นอกโปรเจทซะงั้น ลองดูครับ ๆ
|
 |
 |
 |
 |
Date :
2014-03-11 22:39:56 |
By :
benzsara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เช็คในไฟล์ ckupload.php อ่ะครับ ของผมเซ็ตไว้ประมาณนี้
Code (PHP)
$url = 'upload/files/'.$_FILES['upload']['name'];
//extensive suitability check before doing anything with the file...
if (($_FILES['upload'] == "none") || (empty($_FILES['upload']['name'])) )
{
$message = "No file uploaded.";
}
else if ($_FILES['upload']["size"] == 0)
{
$message = "The file is of zero length.";
}
else if (($_FILES['upload']["type"] != "image/pjpeg") && ($_FILES['upload']["type"] != "image/jpeg") && ($_FILES['upload']["type"] != "image/png") && ($_FILES['upload']["type"] != "image/gif"))
{
$message = "The image must be in either GIF , JPG or PNG format. Please upload a JPG or PNG instead.";
}
else if (!is_uploaded_file($_FILES['upload']["tmp_name"]))
{
$message = "You may be attempting to hack our server. We're on to you; expect a knock on the door sometime soon.";
}
else {
$message = "";
$move = move_uploaded_file($_FILES['upload']['tmp_name'], $url);
if(!$move)
{
$message = "Error moving uploaded file. Check the script is granted Read/Write/Modify permissions.";
}
$url = "http://www.เว็บของคุณ.com/" . $url;
}
if($message != "")
{
$url = "";
}
$funcNum = $_GET['CKEditorFuncNum'] ;
echo "<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction($funcNum, '$url', '$message');</script>";
|
 |
 |
 |
 |
Date :
2014-03-12 09:20:21 |
By :
arm8957 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
http://www.upload-thai.com/download.php?id=127aa07a7f474aae3533d617593ff0b2
อ่ะลองเอาของผมไปดูครับ
finder + editor
|
 |
 |
 |
 |
Date :
2014-03-12 09:56:03 |
By :
benzsara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ครับ ผมจำไม่ได้ว่าผมใส่ชื่อโฟเดอร์โปรเจทไปรึเปล่า น่าจะใช่นะ คือถ้าไม่ใส่ มันจะอัพลงไปนอกโปรเจทอ่ะ
|
 |
 |
 |
 |
Date :
2014-03-12 23:42:20 |
By :
benzsara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ck เวลาทำ upload รูป ต้องใช้ fullpart ครับ
|
 |
 |
 |
 |
Date :
2014-03-13 09:15:35 |
By :
kokiflam |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|