gpt4 book ai didi

php var_dump() 不显示非英文字符

转载 作者:行者123 更新时间:2023-12-02 16:20:35 25 4
gpt4 key购买 nike

我现在正在从事日本项目。当我使用 var_dump() 时,日文字符在浏览器中无法正确显示。但英文字符显示正确。我该如何解决这个问题。以下是我的 var_dump() 结果的一部分,

  'id' => int 71680
'customer_id' => int 16161
'amount' => string '1' (length=1)
'second_customer_id' => null
'second_amount' => null
'customer_name' => string '飛知和 啓一' (length=18)
'second_customer_name' => null
'payment_flag' => string '掛' (length=3)
'payment_flag_id' => int 2
'order_id' => int 9108
'article_name' => string '祭壇' (length=6)
'article_id' => int 1000001
'sales_price' => string '200000.0' (length=8)
'discount' => int 0
'ceremony_cooking_category_id' => null
'payment_date' => string '2014/12/05' (length=10)
'payment_hour' => string '0' (length=1)
'payment_min' => string '0' (length=1)
'hall_id' => null
'hall_name' => null
'hall_address' => null
'hall_tel' => null
'stock_date' => null
'stock_confirm_emps_name' => null
'check_date' => null
'check_emps_name' => null
'note' => string 'memo 333' (length=8)
'label' => string 'label 333' (length=9)

最佳答案

添加

Header("Content-Type:text/html;charset=utf8");

var_dump 之前,将 utf8 更改为您的数据库使用的编码。

关于php var_dump() 不显示非英文字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43623505/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com