0
我一直在尋找幾個小時的解決方案,使用PHP腳本刪除文件中的文本塊。從文件中刪除多行使用PHP
似乎有很多選項可用於刪除文本行,但不包含文本塊。我試圖使用preg_replace ("/^$start.*?$end/s", $replace, $fdata)
以下內容,但尚未找到可行的解決方案。
我相信有人已經這樣做了,所以任何幫助將不勝感激。
$start = "# Copyright 2000-";
$end = "Agreement.";
# This software product may only be used strictly in accordance
# with the applicable written License Agreement.
你在寫這個軟件嗎?或者你試圖竊取的軟件? – Matt 2012-08-06 15:43:44
現在,馬特讓他給他帶來懷疑,他可以開源他自己的軟件,或更新他或他的公司編寫的軟件許可證。 – VoronoiPotato 2012-08-06 15:45:19
@VoroniPotato永遠不會! – Matt 2012-08-06 15:47:03