LoginSignup
7

More than 5 years have passed since last update.

phpの文字化けを直す

Last updated at Posted at 2015-08-30

HTML形式でPHPを書いていた時
文字化けが起こり、足止めをくらったのでメモ。

HTMLのheadタグの中に以下を書けば解消された。

php
<?php
header('Content-Type: text/html; charset=UTF-8');
?>
<!DOCTYPE html>
<html>
<head>
<title>文字化けを直したい。</title>
</head>
</html>

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
7