在线运行python语句_代码在线运行工具

这是一个简单的在线代码执行工具,主要用于本地使用。支持多种编程语言,如Python、PHP、C等。用户可以输入代码并直接运行,获取执行结果。工具还包括源码查看、数据保存等功能。
摘要由CSDN通过智能技术生成

author:zbseoag

仅限于本地使用,不要放在服务器上

**/

error_reporting(E_ALL);

date_default_timezone_set('Asia/Shanghai');if (!empty($_REQUEST)){

(new Tool($_REQUEST['data']))->{$_REQUEST['action']}();exit;

}?>

我的工具包

* {padding: 0; margin: 0;font: 14px "微软雅黑"; }

html,body { width: 100%; }

button { padding:4px 10px; }.button {padding: 4px 10px; min-width: 110px; margin: 4px 0; }

li {margin-bottom:10px; }

table{ border-collapse:collapse; }

tr{ border: 1px solid #CCC; }

td, th{ border: 1px solid #CCC; }

Shell (S)

Python (P)

Lua (L)

PHP (H)

C 语言 (C)

Java (J)

Go (G)

var log = console.log;functionel(id){return document.getElementById(id);

}

asyncfunctionget(url){if(type == 'json'){return await fetch(url).then(response => response.json());

}else{return await fetch(url).then(response => response.text());

}

}

asyncfunction post(url, data, type='text'){

let form= newFormData();for(let keyin data) {

form.append(key, data[key]);

}

let option= {method:'POST', body:form};if(type == 'json'){return await fetch(url, option).then(response => response.json());

}else{return await fetch(url, option).then(response => response.text());

}

}classForm {

constructor(id, url=''){

this.option ={'header':new Headers(),

'method':'P

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值