summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/functions.php b/functions.php
new file mode 100644
index 0000000..8a7824b
--- /dev/null
+++ b/functions.php
@@ -0,0 +1,29 @@
+<?php
+
+
+function echoln($content){
+ if($content === true){
+ $content = "true";
+ }
+ if($content === false){
+ $content = "false";
+ }
+ echo $content;
+ echo "<br/>";
+}
+
+function println($content)
+{
+ print_r($content);
+ echo "<br/>";
+}
+
+// 替换为html转义字符,否则插入sql会有问题
+function html_escape_string($str) {
+ $str = str_replace("'", "&apos;", $str); // '
+ $str = str_replace('"', "&quot;", $str); // "
+ return $str;
+}
+
+?>
+