Ngisanda kuthola inketho enhle ku-MySQL yokungena ohlelweni lwefayela futhi ngithole imininingwane ebalulekile, ngokwesibonelo ngokuba khona kwamafayela namafolda noma okuqukethwe kwawo. Lokhu kungasiza kakhulu njengokunye okuhlukile kokusebenza kwe-php file_exists , njengoba ulwazi olumayelana nokuba khona kwamafayela lusengasetshenziswa embuzweni wokuqhubeka nokuhlunga nemisebenzi yokuhlanganisa.
Uma umsebenzisi wedatha ohambisanayo enelungelo le- FILE , ungasebenzisa umyalo
SELECT LOAD_FILE(*PFAD ZUR DATEI*)
Ngesikhathi sombuzo ungabheki kuphela ukuthi ngabe ifayili likhona yini, kepha futhi funda okuqukethwe kwalo.
Kuzinhlelo zeWindows kufanele kuqashelwe ukuthi ukubuyela emuva endleleni eya kufayela kufanele kumakwe ngokufanele (isibonelo: C: \\ Windows \\ System32 \\ drivers \\ etc \\ hosts). Isici sokuphepha akufanele futhi singanakwa ngokuphelele, ngoba lapho kunikezwa ilungelo le-FILE, ukufinyelela ku-database ngokuzenzakalela kusho ukufinyelela kulo lonke uhlelo lwefayela.
Ukuqinisekisa ukuthi akubuyiswa kuphela amanani we-NULL, kufanele kuqinisekiswe ukuthi umsebenzisi osebenzisa i-MySQL uwafundile amalungelo.
Ukufinyelela kumafayili amakhulu, impahla yomhlaba "i-max_allowed_packet", esethelwe ku-1 MB, kufanele inyuswe.
mysql -u... -p... set global max_allowed_packet = 1024 * 1024 * 512; exit;
Manje usungakwazi (ngemuva kokuqalisa kabusha iseva) ukufinyelela amafayela afinyelela ku-512 MB ngosayizi.