Archive for the ‘ 网络 ’ Category
uc_admins 管理员帐号列表 uc_applications 挂接应用程序列表 uc_badwords 敏感过滤词列表 uc_domains 挂接应用程序域名和IP对应表 uc_failedlogins 登录失败日志表 uc_feeds [ READ MORE ]
问题都是一个,结论总是奇形怪状. 状况: ecshop 验证码不显示 1) 原因1: 有客户试图用前台英文后台中文模式工作,他就仿照一些方法,覆盖了语言文件 导致一些CFG 后台设置的变量无法读取, 解决方法,修改 captcha.php 文件,不包含 init.php, 然后手动传入宽高变量 首先定义 ROOT_PATH define(‘ROOT_PATH’, “绝对路径”); 然后 $img = new captcha(ROOT_PATH . ‘data/captcha/’, $_CFG['captcha_width'], $_CFG['captcha_height']); 变为 $img = new captcha(ROOT_PATH . ‘data/captcha/’, 100, 20); 2) 原因2,修改了某些utf-8文件,结果保存成 utf-8+ 也就是传说中的 utf-8 with bom 解决方法,找到对应文件,应 editplus 重新保存成 utf-8 无bom [ READ MORE ]
效果图如下: 此日历可以上翻,下翻月份和年份,并同步把该年和当月有文章的日期用CSS突显出来。 下载附件后,安装方法如下: 把除了listarc.htm这个文件外的其他四个文件放到根目录下plus文件夹下,如果放其他文件夹的话自己修改下路径。 listarc.htm 放到风格文件夹下的default文件夹中,如果放其他位置请打开listarc.php自己修改。 打开echo_js.htm文件,搜索Calendar_bg.jpg把路径替换成你的域名。图片可以自己设计,把它放到根目录下images文件夹中 最后就是调用的方法了,非常简单,在你模板文件中想放到什么地方加上以下代码即可: <div> <iframe src=”/plus/echo_js.php” width=”256″ height=”176″ marginwidth=”0″ marginheight=”0″ frameborder=”0″ scrolling=”no”></iframe> </div> 宽高自己修改。 背景图可以自己设计换掉,非常简单。 附件下载地址:http://www.dengshanxie.org/images/dede_js_date.rar [ READ MORE ]
可以查看手册了解函数意义,无论浏览器是否关闭,函数都会执行。WINDOWS的计划任务可能都了解。 看个实例吧: <?php ignore_user_abort(); // run script in background set_time_limit(0); // run script forever $interval=60*15; // do every 15 minutes… do{ // add the script that has to be ran every 15 minutes here // … sleep($interval); // wait 15 minutes }while(true); ?> [ READ MORE ]
一款非常不错的网站log日志分析软件,sem一家之言开发的,导入日志可以自动分析蜘蛛爬行和抓取记录,及详细状态码分析。 下载地址: 网站日志分析软件下载 [ READ MORE ]
curl_close — 关闭一个curl会话 curl_copy_handle — 拷贝一个curl连接资源的所有内容和参数 curl_errno — 返回一个包含当前会话错误信息的数字编号 curl_error — 返回一个包含当前会话错误信息的字符串 curl_exec — 执行一个curl会话 curl_getinfo — 获取一个curl连接资源句柄的信息 curl_init — 初始化一个curl会话 curl_multi_add_handle — 向curl批处理会话中添加单独的curl句柄资源 curl_multi_close — 关闭一个批处理句柄资源 curl_multi_exec — 解析一个curl批处理句柄 curl_multi_getcontent — 返回获取的输出的文本流 curl_multi_info_read — 获取当前解析的curl的相关传输信息 curl_multi_init — 初始化一个curl批处理句柄资源 curl_multi_remove_handle — 移除curl批处理句柄资源中的某个句柄资源 curl_multi_select — Get all the sockets associated with the cURL extension, which can then be “selected” curl_setopt_array — 以数组的形式为一个curl设置会话参数 curl_setopt — 为一个curl设置会话参数 curl_version — 获取curl相关的版本信息 curl_init()函数的作用初始化一个curl会话,curl_init()函数唯一的一个参数是可选的,表示一个url地址。 curl_exec()函数的作用是执行一个curl会话,唯一的参数是curl_init()函数返回的句柄。 curl_close()函数的作用是关闭一个curl会话,唯一的参数是curl_init()函数返回的句柄。 [ READ MORE ]
fastcgi的详细介绍和配置应用教程,可以下载瞧瞧。 php fastcgi应用教程下载 [ READ MORE ]
官方最新版本:2.72 默认模板 打开根目录下goods.php,找到销售排名那一行: $smarty->assign(‘goods_rank’, get_goods_rank($goods_id)); // 商品的销售排名 在这下面添加: $children = get_children($goods['cat_id']); $smarty->assign(‘new_goods’, get_category_recommend_goods(‘new’, $children)); 最后打开模板文件/themes/default/goods.dwt,找到<div>,在这下面引入新商品文件 <!– #BeginLibraryItem “/library/recommend_new.lbi” –><!– #EndLibraryItem –> 点击保存,清除模板缓存. 默认情况下只能显示3个商品,那么我们打开include/lib.main.php 这个文件,ctrl+f4 查找 $num = isset($static_page_libs[$template][$lib]) ? $static_page_libs[$template][$lib] : 3; 把数字3改成你想显示的个数,比如显示五个,那么改成 $num = isset($static_page_libs[$template][$lib]) ? $static_page_libs[$template][$lib] : 5; 保存即可。 [ READ MORE ]
从B页面点击,打开新页面A,点击新页面A链接,把A页面链接的title值返回给B页面input值。 b.html <html xmlns=”http://www.w3.org/1999/xhtml“> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>B页面</title> <script type=”text/javascript”> function bb(){ window.open(‘a.html’); } </script> </head> <body> <input type=”text” id=”name” /> <a href=”#” onclick=”bb();”>转到A页面</a> </body> </html> a.html <html xmlns=”http://www.w3.org/1999/xhtml“> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>A页面</title> <script type=”text/javascript”> function aa(){ window.opener.document.getElementById(“name”).value = document.getElementById(“aa”).title; window.close(); } </script> </head> <body> <a href=”#” id=”aa” title=”A页面的值” onclick=”aa();”>返回到B页面</a> </body> </html> 说到底就是window.opener这个函数起到的作用而已。 [ READ MORE ]
除了缩略图插件外,还可以用wp自带的表单域选项,来完成这一功能。 在你发表文章的摘要下面会有一个自定义域或者现在改名叫自定义栏目了,在域名称或者栏目名称那填上你准备调用的字段,比如我现在调用的是缩略图,我给他取名为:litpic,然后在值那填上缩略图链接,例如:http://www.baidu.com/img/logo-yy.gif,如果你需要只调用置顶文章,也就是说别的文章没带缩略图,只想调用填了此表单域的文章,那么你可以在右侧公开度那点编辑,把文章选为置顶。 接下来点击外观,编辑,进入主题编辑项,一般情况下是在索引页index.php里面添加,这里我只调用置顶文章,所以在自己想要的区域添加以下代码,HTML标签可以修改: <ul> <?php //查询置顶文章 $sticky = get_option(’sticky_posts’); rsort( $sticky ); $sticky = array_slice( $sticky, 0, 5); query_posts( array( ‘post__in’ => $sticky, ‘caller_get_posts’ => 1 ) ); ?> //调用置顶文章及缩略图 <?php while (have_posts()) : the_post(); ?> <li><a href=”<?php the_permalink(); ?>” title=”<?php the_title(); ?>”><img src=”<?php $key=”litpic”; echo get_post_meta($post->ID, $key, true); ?>” /><span><?php the_title(); ?></span></a></li> <?php endwhile; ?> </ul> 在网上找了一圈说直接开启add_theme_support( ‘post-thumbnails’ )此函数,在页面<?php the_post_thumbnail(); ?>直接调用就可以,不知道是主题不支持还是什么,反正上面那个可以调用就好了。演示站点:http://www.dengshanxie.org,欢迎大家光临,HEHE! [ READ MORE ]
淡泊以明志,宁静以致远!
探讨网络世界,闲聊人生百态!
岁月无声,静听小桥流水人家,连神都救不了我,唯独只有网络!