請,任何人都可以請告訴我如何替換文件標題images.I'm試圖找出如何更換圖像如何更換爲圖像
$rem = array('-','_','%','+','img','photo','photos','picture','pictures','image','images','jpg','jpeg','png','bmp','copy');
$title = str_replace($rem,' ',$title);
$title = preg_replace("@\\b[a-z0-9]\\b [email protected]", "", $title);
結果
的標題部分2015_ferrari_f430_18_1600.jpg -- > 2015-ferrari-f430-18-1600.jpg
Wimmer-RS-Ferrari-F430-Scuderia-1.jpg --> wimmer-rs-ferrari-f430-scuderia.jpg
3-Ferrari-F430-Stradale-Spy_1035.jpg -- > ferrari-f430-stradale-spy-1035.jpg
Auto-Veloce-Ferrari-F430-SVR-3.jpg --> auto-veloce-ferrari-f430-svr.jpg
Auto-Veloce-Ferrari-F430-SVR-8-1024x692.jpg --> auto-veloce-ferrari-f430-svr-1024x692.jpg
how to can be it..
2015-ferrari-f430.jpg
wimmer-rs-ferrari-f430-scuderia.jpg
ferrari-f430-stradale-spy.jpg
auto-veloce-ferrari-f430-svr.jpg
auto-veloce-ferrari-f430-svr.jpg
我真的不明白的標準去除。你想擺脫文件名的最後部分,沒有擴展名,有破折號,數字或x? –