Hi there, guys.
Hey I got an issue today.
I am building a system that creates files on the fly
But I must use utf-8 as default charset,
because it is used for the most application files.
In fact I am doing the basic task.
He is the basic code:
if(file_exists($file)) {
$error = "This is already exists!";
} else {
/**
* Open the file
*/
$f= fopen($file,'x+');
/**
* Write the new content
*/
fwrite($f,$content);
/**
* Close the file
*/
fclose($f);
}
How could I generate this file in utf-8?