เอา library มาใช้แล้วขึ้น Cannot declare class Gumlet\ImageResize, because the name is already in use

สำหรับผู้ที่ เริ่มต้น Programming - PHP มีอะไร แนะนำ หรือข้อสงสัยต้องบอร์ด นี้ คนที่มีความรู้ แบ่งปันคนอื่นบ้างนะ ปัญหาการเขียนโปรแกรม แบบ OOP Session Cookies php network

Moderator: mindphp, ผู้ดูแลกระดาน

ภาพประจำตัวสมาชิก
jamepiyawat
PHP VIP Members
PHP VIP Members
โพสต์: 2008
ลงทะเบียนเมื่อ: 21/05/2019 10:45 am

เอา library มาใช้แล้วขึ้น Cannot declare class Gumlet\ImageResize, because the name is already in use

โพสต์ที่ยังไม่ได้อ่าน โดย jamepiyawat »

ผมได้ลองนำ library ย่อรูปภาพมาใช้แล้วกลับเกิด erorr ครับเป็นเพราะอะไร ครับ

โค้ด: เลือกทั้งหมด

Fatal error: Cannot declare class Gumlet\ImageResize, because the name is already in use in /opt/lampp/htdocs/demo-e-commerce-solutions-for-b2b/plugins/content/mdwatermark/libs/ImageResize.php on line 10
โค้ดที่เรียก library

โค้ด: เลือกทั้งหมด

use \Gumlet\ImageResize;
$root_img = JPATH_ROOT;
include $root_img.'/plugins/content/mdwatermark/libs/ImageResize.php';
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41125
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

Re: เอา library มาใช้แล้วขึ้น Cannot declare class Gumlet\ImageResize, because the name is already in use

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

เช็คก่อนว่ามี Class นั้น หรือยังก่อน Import เข้ามาใหม่
https://www.mindphp.com/%E0%B8%84%E0%B8 ... sts().html
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ภาพประจำตัวสมาชิก
jamepiyawat
PHP VIP Members
PHP VIP Members
โพสต์: 2008
ลงทะเบียนเมื่อ: 21/05/2019 10:45 am

Re: เอา library มาใช้แล้วขึ้น Cannot declare class Gumlet\ImageResize, because the name is already in use

โพสต์ที่ยังไม่ได้อ่าน โดย jamepiyawat »

ทำได้แล้วครับ ผม include ผิดที่ครับ ขอบคุณครับ
rardrar

Can you help me translate

โพสต์ที่ยังไม่ได้อ่าน โดย rardrar »

i am from Italy hello. Can you help me translate? /rardor
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 58