Skip to content

Commit

Permalink
调整输出信息 #10
Browse files Browse the repository at this point in the history
  • Loading branch information
oott123 committed Oct 20, 2013
1 parent c4f61e4 commit 8d632e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions _bpcs_files_/common.inc.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php
function echon($str,$debug=false){
if($debug){
echo $str."\n";
//slient when the message is debug output
//echo $str."\n";
}else{
echo chr(27)."[0;34m".$str.chr(27)."[m\n";
}
Expand Down Expand Up @@ -76,9 +77,9 @@ function cmd($cfe) {
}
function do_api($url,$param,$method = 'POST'){
if($method == 'POST'){
$cmd = "curl -X POST -k -L --silent --data \"$param\" \"$url\"";
$cmd = "curl -X POST -k -L --data \"$param\" \"$url\"";
}else{
$cmd = "curl -X $method -k -L --silent \"$url?$param\"";
$cmd = "curl -X $method -k -L \"$url?$param\"";
}

return cmd($cmd);
Expand Down

0 comments on commit 8d632e4

Please sign in to comment.