LMLPHP后院

使用php函数simplexml_load_string解析xml注意事项

PHP 解析 xml 的方法有很多种,比如 DOMDocument 的 xpath,XMLReader,SimpleXML,XML Expat Parser 等。一般情况下,解析一段格式比较规则的 xml,程序员对字符的处理能力比较强的话,自己写一个解析器也未尝不可。大多数情况下,使用面向对象的库来解析 xml 是不太方便的,不如函数来的爽快。 使用函数 simplexml_load_string 的坑 文本讲述...

使用LMLPHP和PHPMailer发送邮件

P 框架为例,结合 phpmailer 发送邮件,删除了抄送、回复等一些配置,代码参考。 public function mailtest(){ require '/Users/leiminglin/Documents/GIT/GITHUB/PHPMailer/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->isSMTP(); // Set mailer...

LMLPHP第二期更新功能

             LMLPHP节后更新功能LML_REQUEST_URI增加了常量LML_REQUEST_URI,此常量一般情况下和SERVER变量的REQUEST_URI相同,当项目目录在DOCUMENT_ROOT下级时,会去除入口文件之前的部分。此常量在路由抵达控制器方法后再次匹配进行二次路由时特别有效。修复assign方法部分变量名冲突优化使用assign方法后可能会出现变量值丢失问题,通过增加f...

解决Ubuntu cannot change locale (en_US.UTF-8)

用 screen -U 设置编码为 UTF-8 ,依然出现如下警告。 Welcome to Ubuntu 13.10 (GNU/Linux 2.6.32-042stab094.7 x86_64) * Documentation: https://help.ubuntu.com/ Last login: Fri Mar 27 07:19:43 2015 from 101.231.33.158 -bash: warn...

Linux Ubuntu 下配置虚拟主机并开启ReWrite教程

bled 目录下即可,也可以直接在 sites-enabled 下面创建配置文件。如下配置参考: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /srv/www/lblog.lmlphp.com ServerName lblog.lmlphp.com <Directory /srv/www/lblog.lmlphp.com> All...

SSH免密码登录方法简易教程

以直接连接到服务器上面了,如下所示: ssh dev lmlphp\Welcome to Ubuntu 13.10 (GNU/Linux 2.6.32-042stab108.5 x86_64) * Documentation: https://help.ubuntu.com/ You have new mail. Last login: Mon Nov 2 21:29:04 2015 from ns.alcat...

开源网页聊天室应用WebChat发布

bpage.3. How to configure WebChat?Open the file config.php, then you can customize the port and IP. document.write('临时体验地址:http://107.155.101.65/WebChat 此链接已暂停服务,敬请谅解!'); ...

在JavaScript中使用操作符void返回undefined

ined。在函数中获得 undefined 也有其他的方式,请看下面的例子,代码片段摘自LMLJS框架: <script> (function(win, doc, undf){ })(window, document); </script> 上面的匿名函数中,在定义参数时多定义了一个,没有传入的参数默认值就是 undefined 。关于在 JavaScript 中如何获取 undefined ?直接使用 unde...

手机站建设HTML5触摸屏touch事件使用介绍

move:触摸时手指在屏幕上滑动的时候触发 touchend:触摸结束的时候触发 touchcancel:系统取消touch事件的时候触发 事件绑定,代码示例: <script> var obj = document.getElementById('id'); obj.addEventListener('touchstart', touchStart, false); obj.addEventListener('...

Nginx 403 错误解决方法

try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/run/php-fpm/php-fpm.sock; fastcgi_split_path_info ^(.+...
2024-04-20 13:19:13 1713590353 0.023155