Problem with whitespace before doctype

后端 未结 8 1745
迷失自我
迷失自我 2021-01-19 00:45

I got some strange problem where i have 2 copies of same website in 2 different folders. In one of those 2 copies has whitespace before doctype declaration so i have problem

8条回答
  •  别那么骄傲
    2021-01-19 01:13

    In my case this works fine:

    $ brew update
    $ brew install coreutils
    $ cd directoryWithSymfony2Project
    $ for file in $(find ./ -name '*.twig' -or -name '*.php'); do sed `echo -e 's/[\xC2\xA0]//g'` $file > temp; echo 'Processing ' $file;rm $file; mv temp $file; done 
    

提交回复
热议问题