الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

نوع حقل الصور في الداتابيس

بدأه roroo في 15 ديسمبر 2011 · 2 رد · 685 مشاهدة · في منتدى تطوير المواقع بـ PHP
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

هل ممكن اضيف صور في الداتابيس

واذا ممكن! ايش راح يكون نوعها

انا استخدم برنامج xampp

#2

الافضل انك تضيف الصور في مجلد خاص بها

و تضيف الصور في قاعدة البيانات كرابط فقط

و تقوم باستداعء هذا الرابط ووضعه دخل صوره

مثلا هتعمل حقل اسمه image

و تدخل فيه رابط مثلا

/folder/image/mypicture.jpg

ثم تقوم باستدعاءه بدالة SELECT

ثم تضعه داخل وسم صورة

<img src='<?$image;?>' />

تم تعديل هذه المشاركة بواسطة HUSSEin-AHMeD في 16 ديسمبر 2011 في 00:01

@My Twitter

[spacing]

EGYPT

[/spacing]

#3

The solution HUSSEin-AHMeD provides works fine, where you are storing the images is such a directory and then store the URL for the image file in the database as a TEXT.

It is a more like you are storing a pointer to the image file, and you use this pointer (URL) to get the image and display it.

Storing the image of the data itself in the database rather than storing a pointer to it can be achieved by using a BLOB data type.

BLOB data type is a Binary Large Object that van hold a variable amount of binary data.

So You can read the binary data of the image and store it the BLOB filed in your database, and read this binary data to construct the image and display it.

My apologies if what I've just typed doesn't make any sense to you.

مواضيع مشابهة