I am using exec "wrapper" for linux commands in PHP:
exec("unzip -oj tmp.zip -d tmp && rm tmp.zip");
Please tell me how can i convert spaces to underscores in filenames? Tnx,
I am using exec "wrapper" for linux commands in PHP:
exec("unzip -oj tmp.zip -d tmp && rm tmp.zip");
Please tell me how can i convert spaces to underscores in filenames? Tnx,
If you don'y mind using external utilities (as you're currently doing), you can use rename
eg.
unzip -oj tmp.zip -d tmp && rename 's/\s/_/g' tmp/* && rm tmp.zip