File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ $Test->SetFunc("/",function(){
1010 Web.Print("<h4>Hello World!");
1111 Web.Print("</h4>");
1212});
13+ //$Test->SetFunc("RunCode",Eval);
1314$Test->Run();
1415
1516function One(){
@@ -25,6 +26,10 @@ function One(){
2526 Web.Print(Seq.Json_encode($Array));
2627 Web.Print("</pre>")
2728}
29+ function Eval(){
30+ $Code = Web.POST("Code");
31+ Web.Print(Sys.Eval($Code));
32+ }
2833function GetTest(){
2934 Web.Header_Set("content-type","text/json; charset=utf-8");
3035 $Array["Data"] = "OK";
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import(
1616 "strings"
1717 "github.com/peterh/liner"
1818)
19- const Version = "4.6.2 "
19+ const Version = "4.6.3 "
2020func RunCode (Code string ,FilesStruct vm.FileValue )vm.FileValue {
2121 Opcode := Compile (Code )
2222 if ini .DebugsIf (){
@@ -191,4 +191,4 @@ func main(){
191191 }
192192 gc .Gc_Ends ()
193193 vm .VmEnd ()
194- }
194+ }
You can’t perform that action at this time.
0 commit comments