I work on a php site that requires both Japanese and English. In most cases, I have no problem displaying the Japanese correctly, but I cannot get the characters to display if I use this function:
echo.php:
<?php function draw(){ echo "日本語"; } draw(); ?>
I get "日本語"
but if I try: index.php:
<?php some stuff include "echo.php"; draw(); ?>
I get "???". Is there a way to get my echo file to send data to the first file the way it can read it?
EDIT: The website is running and showing Japanese characters correctly, unless it tries to pull a function from a php file. Here is the code:
<html lang="ja"> <head> <title>Running Projects</title> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> </head> <body> <div id="header"> <? php include "layout.php" ?> </div> </body> </html>
Where layout.php is just a file with a list of links, I have this on every page so that the links are on every page. For the other part, I have to use functions.php to get some data from the database and write it to the page, so I tried to put layout.php in function.php and call it: English links appeared, but Japanese links appeared as question marks .
Asitaka
source share