summaryrefslogtreecommitdiff
path: root/utils.php
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-03-19 12:26:19 +0800
committerchai <chaifix@163.com>2022-03-19 12:26:19 +0800
commit627b8e416d138112ad20b1299aca21dccebcd11c (patch)
treee522a5e7204e81649a36451e31c2c91b1a8342e3 /utils.php
parenta90ed9f20c76fbb4b340e51e6ba05500540feba5 (diff)
*admin music page
Diffstat (limited to 'utils.php')
-rw-r--r--utils.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/utils.php b/utils.php
new file mode 100644
index 0000000..8a7824b
--- /dev/null
+++ b/utils.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;
+}
+
+?>
+