Categories
programming

UTF 8 error on php

Warning:?Cannot modify header information -?headers already sent by (output started at …

If you get this?error on a php file that uses UTF-8 encoding it is because your editor creates a signature at the beginning of the file to mark it as a UTF-8 file. Most UTF-8 compatible editors will create and hide this signature (windows notepad too) and you will not be able to see and delete it.?Fortunately?the solution is very simple, if you use Windows run cmd, and use the old DOS editor to edit your file. You will see a few strange characters at the beginning of the file that are creating all the troubles. Just delete those characters and save the file. Remember that if you edit the file again with notepad or other editor that generates the signature, you will have to delete it again.

For more information about programming services please visit?/e/webservices.html