Thursday, March 11, 2010

finding additional line returns at the end of php files

Extra line returns at the end of php files can cause issues - breaking http headers,xml files and compression of output problems.
The Unix command

grep -rP "\?>\n\n+$" *

run in the same directory as the php should locate the offending files