Answer the question
In order to leave comments, you need to log in
Creating a file in PHP?
I create a file
$file="html/{$myid[0]['num']}.html";
if(!file_exists($file)) {
$fp = fopen($file, "w");
fwrite($fp, "
<html>
<head>
<title>{$myid[0]['title']}</title>
<meta http-equiv=\"Content-type: text/html; charset=UTF-8\">
</head>
<body>
{$myid[0]['text']}
</body>
</html>
");
fclose ($fp);
}
Answer the question
In order to leave comments, you need to log in
What is the encoding of the script itself? $myid[0]['text']
Where does it come from and in what encoding?
Store everything in utf8 (files, tables in the database) and you will be happy.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question