查看PHP笔记的源代码
←
PHP笔记
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== 数据类型数组 == https://www.php.net/manual/zh/language.types.array.php <br> == XML == <source lang=php> <?php $xmldata = <<<XML <?xml version="1.0" encoding="utf-8" ?> <root> <gateway_id>1122</gateway_id> <data operation="report"> </data> </root> XML; $root = new SimpleXMLElement($xmldata); echo "Gateway ID: " . $root->gateway_id . "\n"; ?> </source> <br> == 正则表达式 == <pre> '/Result:\s*[^0]{1}\s*row.*<table>.*<tr>.+<\/tr>[^<]*<tr\s?>(.+)<\/tr>/s' -----> *, + 都是最大匹配 </pre> 适当就好要用 *? 和 +? <pre> '/Result:\s*[^0]{1}\s*row.*<table>.*?<tr>.+?<\/tr>[^<]*?<tr\s?>(.+?)<\/tr>/s' </pre> <br><br> == Time == <source lang=php> <?php date_default_timezone_set("UTC"); echo "UTC:".time(); echo "<br>"; date_default_timezone_set("Asia/Shanghai"); echo "Asia/Shanghai:".time(); echo "<br>"; ?> UTC:1526196418 Asia/Shanghai:1526196418 int time ( void ) // Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). // The function time() returns always timestamp that is timezone independent (=UTC). </source> <br><br> == 资源 == * PHP 快速把握: http://www.5idev.com/p-php_regular_syntax_1.shtml * PHP Tutorial: http://www.tutorialspoint.com/php/index.htm * PHP 在线执行: http://writecodeonline.com/php/ * PHP 参考手册: http://www.php.net/manual/zh/funcref.php * http://www.w3school.com.cn/php/php_cookies.asp * http://www.w3school.com.cn/php/php_operators.asp * http://www.tutorialspoint.com/execute_php_online.php * http://www.w3school.com.cn/tiy/t.asp?f=html5_input_placeholder <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br>
返回到
PHP笔记
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面