PHP
zhuangb1025
这个作者很懒,什么都没留下…
展开
-
PHP中Unicode编码转换为UTF-8字符
/** * utf8字符转换成Unicode字符 * @param [type] $utf8_str Utf-8字符 * @return [type] Unicode字符 */ function utf8_str_to_unicode($utf8_str) { $unicode = (ord($utf8_str[0]) & 0x1F) << 12; $u转载 2016-05-29 14:07:14 · 508 阅读 · 0 评论 -
PHP不同目录下文件相互引用,相对路径填写。
/a/a.php$a = 100; $b = 100;/b/b.phprequire_once '../a/a.php'; function sum($a,$b) { return $a * $b; } $c = sum($a,$b); echo $c;此时b.php会输出:10000 但,若通过另一文件夹c下c.php引用b.php并输出$c: /c/c.phprequire_once原创 2016-05-19 18:12:54 · 4588 阅读 · 0 评论