Batch script to replace PHP short open tags with <?php

前端 未结 13 1877
轻奢々
轻奢々 2020-11-30 01:49

I have a large collection of php files written over the years and I need to properly replace all the short open tags into proper explicit open tags.

change \         


        
13条回答
  •  甜味超标
    2020-11-30 02:55

    Unfortunately, automated solutions may not work. My recommendation:

    1) Use grep to find all short tags:

    grep -rn "

    2) Go through each file and line and fix manually

    I understand that this might not be a viable solution if you have a huge project, but for me it worked well.

提交回复
热议问题