asked on
348657856**56985897568976
N1*PR*Jasmine sdgugu
gughyug
35647856834756
REF*2U*7248
gfhgfdugs
ghdugyuigy4576
4867586
N1*PR*John ~
eghufgguigr
4975876346
REF*2U*SMIL
tfgugrt47587
CAS495787656
5687564
348657856**56985897568976
N1*PR*Jasmine sdgugu
gughyug
35647856834756
REF*2U*7248
gfhgfdugs
ghdugyuigy4576
4867586
CAS495787656
5687564
348657856**56985897568976
N1*PR*John ~
eghufgguigr
4975876346
REF*2U*SMIL
tfgugrt47587
CAS495787656
5687564
98475789456.5010.4676897.edi
98475789456.5010.4676897_copy.edi
$files = './';
$dh = opendir($files);
$i = 5010;
while(! feof($files)) {
$contents = stream_get_line($dh,1000,"REF*2U*");
file_put_contents('new_file.'.$i. $contents);
}
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.
TRUSTED BY
You need logic for checking if splitting is needed, then actual splitting, then overwriting the original file and adding a copy, while line 1 in each file.
On top of that, seems you need to copy the last two lines to the first file as well? So yes, please start a gig