summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-03-17 21:02:13 +0800
committerchai <chaifix@163.com>2022-03-17 21:02:13 +0800
commit90483f6eb389f041e0dbd0fca8bb766edbc85910 (patch)
tree125e5d01012cbab1ada0546dc5b9771af573a9ea /functions.php
+init
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;
+}
+
+?>
+