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

前端 未结 13 1820
轻奢々
轻奢々 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:45

    I've had to go through this before and I found it best to do it in stages. A bad script trying to catch it all can mess up a LOT of files.

    I used Coda (or any other web editor) to do a simple find and replace on very specific strings.

    For example starting with "

    It may seem a little more tedious but I was confident that something wasn't getting messed up somewhere that I didn't know about. Going back is a real pain.

提交回复
热议问题