上传者: 38547035
|
上传时间: 2021-11-14 11:02:47
|
文件大小: 36KB
|
文件类型: -
要实现ThinkPHP在线翻译功能,需要先在百度开发者中心注册一个API key,具体实现代码如下:
action代码部分:
<?php
class FanyiAction extends Action {
public function _empty(){
header("HTTP/1.0 404 Not Found");
$this->display("Public:404");
}
public function index()
{
$User = A("Index");
$User->head();
$User->right();
$User->footer();