jeremiah123 2016-09-24 13:08 采纳率: 40%
浏览 1680

thinkphp里面出现乱码

源文件代码是

文件名:a\Home\Controller\UserController.class.php
<?php

namespace Home\Controller;
use Think\Controller;

class UserController extends Controller {
public function login(){
$this -> display();
//echo '大家好';
}
}

文件名:a\View\User\login.html




无标题文档

welcome



文件名:a\index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



欢迎Thinkphp


<?php
define('APP_DEBUG',true);//开发调试模式
//define('APP_DEBUG',false);
include("../ThinkPHP/ThinkPHP.php");
?>

运行 http://localhost/thinkphp3/a/index.php/Home/User/login

出现乱码,查看html代码

{<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



�ޱ����ĵ�


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



无标题文档

welcome



}

为什么运行出来的时候,我点查看源码出现两个4个html标签呢?正常应该是2个html啊!

  • 写回答

2条回答 默认 最新

  • threenewbee 2016-09-24 13:12
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿