hehexu

博客园 首页 新随笔 联系 订阅 管理
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 21 下一页

2018年4月6日 #

摘要: str_pad — 使用另一个字符串填充字符串为指定长度 <?php$input = "Alien";echo str_pad($input, 10); // 输出 "Alien "echo str_pad($input, 10, "-=", STR_PAD_LEFT); // 输出 " Alien 阅读全文
posted @ 2018-04-06 12:20 hehexu 阅读(122) 评论(0) 推荐(0)

2018年4月4日 #

摘要: Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_tim 阅读全文
posted @ 2018-04-04 14:11 hehexu 阅读(138) 评论(0) 推荐(0)

2018年3月31日 #

摘要: 对于我们做php开发的人员,上了生产环境,一定要把相关debug,display_errors错误提示等关掉。谁还难免不犯个错呢?这样能防止非致命性报错下,导致项目路径、数据库等信息泄漏。 问:那么问题来了,我们在生产该如何查看php等相关错误呢? 答:记录到错误日志里。error.log(或直接发 阅读全文
posted @ 2018-03-31 11:19 hehexu 阅读(234) 评论(0) 推荐(0)

2018年3月30日 #

摘要: WordPress通过301重定向实现非首先域(非www)跳转向本来是一个很简单事情,由于没弄清楚$_SERVER['HTTP_X_REWRITE_URL'] 和$_SERVER['REQUEST_URI']的区别导致了循环重定向问题。 现在来具体研究下$_SERVER['HTTP_X_REWRIT 阅读全文
posted @ 2018-03-30 22:16 hehexu 阅读(406) 评论(0) 推荐(0)

2018年3月29日 #

摘要: 第一、强制www域名301跳转 RewriteEngine onRewriteCond %{HTTP_HOST} ^itbulu\.com [NC]RewriteRule ^(.*)$ https://www.itbulu.com/$1 [L,R=301,NC] 我们将域名替换成自己的域名即可实现非 阅读全文
posted @ 2018-03-29 21:30 hehexu 阅读(201) 评论(0) 推荐(0)

摘要: Socket可以理解为两台计算机相互通信的通道。 用法:使用fsockopen()函数 具体用法详见上篇文章。函数的参数为URL、端口号、一个存放错误编号的变量、一个存放错误信息字符串的变量和超时等待时间。(只有第一个参数是必须的) 常见的端口表: 端口号 主要用途 21 FTP 22 SSH 23 阅读全文
posted @ 2018-03-29 08:48 hehexu 阅读(130) 评论(0) 推荐(0)

2018年3月28日 #

摘要: 转载自:https://blog.csdn.net/baidu_30000217/article/details/52743139 php实现类文件自动载入有两种办法: 魔术方法:__autoload(); SPL标准库提供的spl_autoload_register(); 一、__autoload 阅读全文
posted @ 2018-03-28 07:19 hehexu 阅读(140) 评论(0) 推荐(0)

2018年3月25日 #

摘要: function DeletePDU(){ global $person; $this->MakeSafe(); // Do not attempt anything else if the lookup fails if(!$this->GetPDU()){return false;} // Ch 阅读全文
posted @ 2018-03-25 09:50 hehexu 阅读(149) 评论(0) 推荐(0)

2018年3月24日 #

摘要: static function getPortNames($DeviceID,$portid=null){ if(!$dev=SwitchInfo::BasicTests($DeviceID)){ return false; } // We never did finish the discussi 阅读全文
posted @ 2018-03-24 11:42 hehexu 阅读(130) 评论(0) 推荐(0)

2018年3月23日 #

摘要: 以前在使用java开发中,通常都是在session里面存放的对象。在使用php开发中,也打算在session中存入对象,确实能把对象放进去,也能把整个对象输出,但就是取不出对象里面的属性。 通过print_r($obj) 查看,输出的是下面这串: __PHP_Incomplete_Class Obj 阅读全文
posted @ 2018-03-23 13:49 hehexu 阅读(2423) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 21 下一页