I-PHP: Ukufinyelela kwefayela ngama-umlauts ngaphansi kweWindows

Amafayela akumaseva wewebhu kufanele ngaso sonke isikhathi angabi nazikhala (hhayi "lesi isithombe.jpg"), ngaphandle kwama-umlauts noma izinhlamvu ezikhethekile (hhayi i- "football.jpg"), ngaphandle kwe-backslashes (hhayi i- "Arbeit \ Auto.jpg") futhi ngesimo esincane (hhayi "" isivivinyo.JPG "). Muva nje, kepha bekufanele ngithole futhi ngicubungule inani elikhulu lamafayela asethwe ngaphambili nganoma yiliphi igama lefayela lephrojekthi yekhasimende.


Izinhlelo zeLinux zivumela ukufinyelela kwamafayela anama-umlauts nezinhlamvu ezikhethekile ngokuzenzakalela, ukuze kungabikho zici ezikhethekile okufanele zicatshangelwe lapha. Kubukeka kuhluke ngokuphelele ezinhlelweni zeWindows: Lapha kufanele usebenzise amanye amaqhinga bese uthepha kusixhumi esibonakalayo se-COM. Okokuqala, ufaka isandiso esidingekayo ku-php.ini

[COM_DOT_NET]
extension = php_com_dotnet.dll

eyodwa. Manje kusetshenziswa ikilasi lomsizi elisiza kakhulu i- WinfsUtf8 , elenza kube lula ukufinyelela ezintweni ze-COM namamephu cishe yonke imisebenzi ye-PHP ethinta amafayela. Ngemuva kokuhlanganisa ifayili ne

require_once('WinfsUtf8.php');

eyodwa inawo wonke amathuba wokufinyelela kwefayela, isibonelo imiphumela

file_exists('ä.jpg');

ngokungalungile, kanti

Patchwork\PHP\Override\WinfsUtf8::file_exists('ä.jpg');

ibuya iyiqiniso.

Emuva