Fix charset fuckups for good … (iso/uft to xml entities)

#!/usr/bin/php
<?
for ($i=1; $i<$argc; $i++)
{
//print_r($argv);

print “Doing “.$argv[$i].”….”;;

$buffer=file_get_contents($filename=$argv[$i]);

$buffer=html_entity_decode($buffer);

$buffer=htmlentities($buffer);

file_put_contents($filename,$buffer);

print “Done!\n”;
}
?>

This is the sweet sensation about PHP …. Kiss dude 😉

Dette indlæg blev udgivet i Knowledge Base, Old Base, Programmering. Bogmærk permalinket.

Skriv et svar