include("news/news.php");
読み込む際に、同時に日本語文字コードの変換を行うやり方を以下に示します。
ob_start();
include("news/news.php");
$eucContents=ob_get_contents();
ob_end_clean();
$utf8Contents=mb_convert_encoding($eucContents,"UTF-8","EUC-JP");
echo $utf8Contents;
include("news/news.php");
ob_start();
include("news/news.php");
$eucContents=ob_get_contents();
ob_end_clean();
$utf8Contents=mb_convert_encoding($eucContents,"UTF-8","EUC-JP");
echo $utf8Contents;
Flask の Blueprint は、ルート、静的ファイル、テンプレートをまとめて管理できます。しかし、テンプレートが指定できません。 ここでは、Blueprint の template_folder の問題点と回避策を説明します。 Blueprint のテンプレート問題...