拜托,谁能告诉我如何替换文件标题图像。我正在尝试弄清楚如何替换图像的标题部分
$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 ?@i", "", $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