ไฟล์สกุล python กับ html สามารถนำมารันใน php ได้ไหมคะ
Moderator: mindphp, ผู้ดูแลกระดาน
-
- PHP Jr. Member
- โพสต์: 29
- ลงทะเบียนเมื่อ: 22/10/2019 4:11 pm
Re: ไฟล์สกุล python กับ html สามารถนำมารันในphp ได้ไหมคะ
โค้ดที่ยกมาคือทั้งหมดแล้วค่ะ มันสามารถเอารูปที่อัพโหลดไปเก็บใน database ได้แล้วค่ะ
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 41356
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
Re: ไฟล์สกุล python กับ html สามารถนำมารันในphp ได้ไหมคะ
ลองเช็คการทำงานในส่วนนี้
ตอนสร้าง ฟังก์ชั่น pic() กับ db.session.add() ว่าเขียนไว้ให้ทำอะไร บ้าง ส่ง parameter อะไร เข้าไปบ้าง
โค้ด: เลือกทั้งหมด
newfile = pic( caption=file.filename, img=file.read())
db.session.add(newfile)
ติดตาม 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
ติดตาม 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
-
- PHP Jr. Member
- โพสต์: 29
- ลงทะเบียนเมื่อ: 22/10/2019 4:11 pm
Re: ไฟล์สกุล python กับ html สามารถนำมารันในphp ได้ไหมคะ
เขียนเพื่อตอนกดอัพโหลดรูปแล้วจะเด้งไปอีกหน้าเพื่อบอกว่า save เรียบร้อยค่ะ
- แนบไฟล์
-
- out.jpg (29.42 KiB) Viewed 451 times
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 41356
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
Re: ไฟล์สกุล python กับ html สามารถนำมารันใน php ได้ไหมคะ
โค้ด: เลือกทั้งหมด
class pic(db.Model):
idpic = db.Column(db.Integer, primary_key=True)
caption = db.Column(db.String(45))
img = db.Column(db.LargeBinary)
ติดตาม 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
ติดตาม 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
-
- PHP Jr. Member
- โพสต์: 29
- ลงทะเบียนเมื่อ: 22/10/2019 4:11 pm
Re: ไฟล์สกุล python กับ html สามารถนำมารันใน php ได้ไหมคะ
ลองใส่ datetime เข้าไป มัน error
- แนบไฟล์
-
- error.jpg (14.87 KiB) Viewed 450 times
-
- Similar Topics
- ตอบกลับ
- แสดง
- โพสต์ล่าสุด
-
-
โพสต์ใหม่ สอบถามค่า python มีฟังก์ชั่นปัดเศษเหมือน Roundup ของ google sheet ไหมคะ
โดย MBMoo » 14/03/2023 9:26 am » ใน Programming - C/C++ & java & Python - 2 ตอบกลับ
- 1884 แสดง
-
โพสต์ล่าสุด โดย mindphp
14/03/2023 9:46 am
-
-
-
โพสต์ใหม่ สอบถามเรื่องการเขียนโค๊ด python ภายใต็ HTML
โดย nuattawoot » 21/06/2017 11:56 am » ใน Programming - C/C++ & java & Python - 1 ตอบกลับ
- 609 แสดง
-
โพสต์ล่าสุด โดย mindphp
21/06/2017 12:32 pm
-
-
-
โพสต์ใหม่ สอบถาม wrap ค่าใน value ทะลุหน้าจอ ของ python บน html ค่ะ
โดย MBMoo » 11/06/2020 6:18 pm » ใน Programming - C/C++ & java & Python - 2 ตอบกลับ
- 898 แสดง
-
โพสต์ล่าสุด โดย MBMoo
12/06/2020 10:58 am
-
-
-
โพสต์ใหม่ การเขียน class object ของ python และให้ return เรียกใช้ บน html รูปแบบเป็นแบบไหนคะ
โดย MBMoo » 12/06/2020 1:07 pm » ใน Programming - C/C++ & java & Python - 5 ตอบกลับ
- 1690 แสดง
-
โพสต์ล่าสุด โดย MBMoo
13/06/2020 10:34 am
-
-
-
โพสต์ใหม่ ต้องการจะสร้างไฟล์ HTML เเต่นำค่า php ไป HTML โดย Twig เขียนใน phpbb จะทำยังไงคะ
โดย thatsawan » 24/06/2020 5:45 pm » ใน Programming - PHP - 3 ตอบกลับ
- 4207 แสดง
-
โพสต์ล่าสุด โดย Sirayu
25/06/2020 3:49 pm
-
ผู้ใช้งานขณะนี้
สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 125