/**
* Created by PhpStorm.
* User: Administrator
* Date: 2020/6/24
* Time: 15:07
*/
include './API/qqConnectAPI.php';
function login(){
$oauth = new \Oauth();
$oauth->qq_login();
}
function login_out(){
setcookie('qq_accesstoken',null);
setcookie('qq_openid',null);
}
$c = $_REQUEST['c'];
if ($c == 'login'){
login();
}elseif ($c == 'login_out'){
login_out();
}
function test(){
echo 'UTF-8我是utf8';
}
var file_type = 'php'; //file_type,根据实际判断即可
var editor = ace.edit("code_text");
editor.setTheme("ace/theme/monokai");
editor.setShowPrintMargin(false);
editor.setFontSize(14);
editor.session.setOptions({
mode: "ace/mode/"+file_type,
tabSize: 4,
useSoftTabs: true
});
效果图:
image.png