LAMP之路

不积跬步,无以至千里!

登录phpPgAdmin提示:Login disallowed for security reasons.

2012-10-18 一抹阳光 数据库

修改config文件夹中的config.inc.php: // If extra login security is true, then logins via phpPgAdmin with no // password or certain usernames (pgsql, postgres, root, administrator) // will be denied. Only set this false once you have read the FAQ and // understand how to change PostgreSQL’s pg_hba.conf t...[阅读全文]

评论(0) 浏览(3435)

phpPgAdmin报您的PHP中没有完整的数据库支持

2012-10-18 一抹阳光 数据库

多次在网上搜索解决方法,已完成以下操作: 1、修改php.ini 2、确认C:\php\ext\下php_pgsql.dll存在 3、php.ini中“;extension=php_pgsql.dll”的“;”去掉了 4、将libpg.dll放至windows\system32下 5、重启apache多次 还要加载好几个dll文件,都在postgresql的bin目录下,列在这里,跟我碰到一样问题的可以看看啊! comerr32.dll gssapi32.dll k5sprt32.dll krb5_32.dll libeay32.dll libiconv2.dl...[阅读全文]

评论(0) 浏览(3063)

google双468广告位html代码

2012-10-18 一抹阳光 网站前端

<div style=”float:left;width:468px;”> 468*60广告位代码 </div> <div style=”float:right;width:468px;”> 468*60广告位代码 </div> <div style=”clear:both; height:2px; line-height:2px;”></div> 效果示意图: ...[阅读全文]

评论(0) 浏览(2062)

jquery插件实现图片延迟加载 — jquery.lazyload

2012-10-18 一抹阳光 网站前端

jquery-1.4.2.min_.rar jquery.lazyload.rar 1.导入JS插件   <script src=”jquery.js” type=”text/javascript”></script>  <script src=”jquery.lazyload.js” type=”text/javascript”></script> 2.在你的页面中加入如下的javascript:   $(“img”).lazyload();     这将会使所有的图...[阅读全文]

评论(0) 浏览(2381)

国家气象局提供的天气预报接口

2012-10-18 一抹阳光 杂七杂八

接口地址:http://www.weather.com.cn/data/sk/101010100.html http://www.weather.com.cn/data/cityinfo/101010100.html  http://m.weather.com.cn/data/101010100.html  以json格式提供,格式如下 {“weatherinfo”:{ //基本信息; “city”:”北京”,”city_en”:”beijing”, “date_y”:”2011年8月10日”,”date”:”辛卯年”,”week”:”星期三”,”fchh”:...[阅读全文]

评论(0) 浏览(2074)

php运行出现Call to undefined function curl_init()的解决方法

2012-10-18 一抹阳光 PHP

curl_init — 初始化一个CURL会话,如果提示Call to undefined function curl_init那么需要如下操作即可。 在网上下载了一个模拟登陆discuz论坛的php程序范例,试运行时出现“Call to undefined function curl_init”这个错误提示,没有定义的函数,也就是php还没打开对curl_init函数的支持。Google了一番终于解决了,方法如下: 以windows下的php+apache为例。 首先,打开php.ini,找到“extension=php_curl.dll”,然后去掉前面的“;”注释,重启a...[阅读全文]

评论(0) 浏览(2421)

php出现Cannot modify header information问题的解决方法大全

2012-10-18 一抹阳光 PHP

这样的语句,很显然,造成这个原因是因为setcookie造成的,查了一下网上,有如下的解释: cookie本身在使用上有一些限制,例如: 1.呼叫setcookie的敘述必須放在<html>标签之前 2.呼叫setcookie之前,不可使用echo 3.直到網頁被重新載入後,cookie才會在程式中出現 4.setcookie函数必須在任何資料輸出至浏览器前,就先送出 5.…… 基於上面這些限制,所以執行setcookie()函数时,常會碰到”Undefined index”、”Cannot modify header information – headers a...[阅读全文]

评论(1) 浏览(2988)

[架设教程]CentOS 5 下 OpenVPN 和 Windows 下 OpenVPN GUI 安装教程

2012-10-18 一抹阳光 环境架设

写在前面的话:我们都知道,目前流行的vps解决方案有xen和openvz。vpn软件有pptp和openvpn。那么一般来说pptp只能运 行在xen的vps或者整机上。如果你的vps基于openvz,那么你只能装OpenVPN。下面我用openvz的vps测试安装OpenVPN 。 一. OpenVPN 安装环境 Server 端的环境 1. CentOS, kernel版本: 2.6.18, IP 为 221.233.59.16(ADSL拨号) 2. kernel 需要支持 tun 设备, 需要加载 iptables 模块.(chkconfig --level 35 ipt...[阅读全文]

评论(0) 浏览(4372)

could not start the service mysql error:0错误

2012-10-18 一抹阳光 数据库

当大家在安装、重装时出现could not start the service mysql error:0的错误时,可以尝试下面两种方法。 一、方式1 MySQL安装是出现could not start the service mysql error:0 提示错误,解决方法: 首先,在管理工具->服务里面将MySQL的服务给停止,然后打开cmd 进入你的MySQL bin目录下,例如 C:\Program Files\MySQL\MySQL Server 5.0\bin 然后使用如下命令mysqld-nt -remove 然后就会显示……success! 好了下...[阅读全文]

评论(0) 浏览(2237)

Apache 安装完成后出现“No services installed”错误

2012-10-18 一抹阳光 WEB服务器

Apache 安装完成后无法启动 Apache,在服务里没有出现 apache2 服务,在 Apache Monitor 中 Start 按钮也无法点击。鼠标移到通知区域 Apache 图标上,出现“No services installed”错误提示。 解决办法: 我们在运行中键入: cmd 出来DOS窗口 打开命令提示符,并定位到 Apache 的 bin 目录: cd /d D:\Program Files\Apache Software Foundation\Apache2.2\bin 执行安装: 键入: httpd.exe -k install -n apac...[阅读全文]

评论(0) 浏览(2838)