I need to be able to append the text
to the beginning of php files in a list.
You say 'append the text
Maybe I misunderstood the question, but this should solve your problem:
That will create a bunch of files with same names except prefixed with 'corrected_'. If you want to alter files themselves then you could do this:
...but be sure that's what you want.