出现这报错是正常使用就偶尔会报错,但是DNS没问题,ping也OK,奇怪了,后来查了下,在http://www.ttlsa.com/linux/curl-6-couldnt-resolve-host/ 找到一些资料,估摸着可能是没有用ipv4解析导致的,所以添加类似如[……]
标签归档: PHP
PHP-判断字符串是否全是中文或含有中文的实现代码
PHP-读取docx文件纯文本
function docx2text($filename) {
return readZippedXML($filename, "word/document.xml");
}function readZippedXML($archiveFile[......]解决Nginx 中PHP-FPM 60s超时的问题
配置里加:
fastcgi_read_timeout 时间;单位是秒[……]
PHP-删除非空目录
函数如下:
function remove_directory($dir){
if($handle=opendir("$dir")){
while(false!==($item=readdir($handle))){ if($item!=&q[......]Discuz!-修改贴子列表页-用户名nofollow
涉及文件:
template\default\forum\forumdisplay_list.htm搜索关键字:
{if $thread[digest] != -2}将整个a链接代码从:
<a href="{if $thread[digest][......]Discuz!-修改贴子左侧用户的积分主题帖信息nofollow
涉及文件:
template\default\forum\view\thread_profile_node.htm搜索关键字:
function profile_node_numbercard($post, $s, $e) {在搜索的–>前[……]
Discuz!-首页用户名-nofollow处理
涉及文件:
source/module/forum/forum_index.php搜索关键字:
include loadarchiver('forum/discuz');在搜索的if判定之前添加:
foreach($forum[......]PHP PDO Access PDOException’ with message ‘could not find driver’ 解决办法
windows下的Xampp,PHP文件使用PDO方式访问Access数据库文件,提示:PDOException' with message 'could not find driver'。
搜了下,解决办法:php.ini文件中启[……]