摘要: 举例子如下: 复制代码 代码如下: $url = "http://www.electrictoolbox.com/php-extract-domain-from-full-url/"; $parts = parse_url($url);输出: 复制代码 代码如下: Array ( [scheme] => http [host] => www.electrictoolbox.com [path] => /php-extract-domain-from-full-url/ )又如: 复制代码 代码如下: <?php $url = 'http:// 阅读全文
posted @ 2012-09-21 11:27 F.W.C 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 平常都要用到的几个命令,在此标记一下。。svnadmin create --fs-type fsfs /home/svn/repos/wince6svn -m "create" mkdir file:///home/svn/repos/wince6/bsp-0901echo "hello" >1.txtsvn import /home/jeff/1.txt file:///home/svn/repos/wince6/bsp-0901/1.txt -m "add 1.txt"svn del file:///home/svn/rep 阅读全文
posted @ 2012-09-17 10:50 F.W.C 阅读(294) 评论(0) 推荐(0) 编辑
摘要: ps -ef|grep svnserve 阅读全文
posted @ 2012-09-17 10:45 F.W.C 阅读(1545) 评论(0) 推荐(0) 编辑
摘要: Nginx 是一个轻量级,以占用系统资源少,运行效率而成为web服务器的后起之秀,国内现在很多大型网站都以使用nginx,包括腾讯、新浪等大型信息网站,还有淘宝网站使用的是nginx二次开发的web服务器。直接php+mysql这是Linux web服务器的黄金组合。今天我们一来学如何在ubuntu 12.04 中架设lnmp。1. 使用官方PPA安装 Nginx 最新版本,使用以下命令: sudo add-apt-repository ppa:nginx/stable sudo apt-get update sudo apt-get install nginx Nginx相关控制命令: 启动 阅读全文
posted @ 2012-09-14 10:53 F.W.C 阅读(268) 评论(0) 推荐(0) 编辑
摘要: PHP解决[function.file-get-contents]: failed to open stream: HTTP request failed! 完美解决failed to open stream: HTTP request failed! 当使用php5自带的file_get_contents方法来获取远程文件的时候,有时候会出现file_get_contents(): failed to open stream: HTTP request failed!这个警告信息。google或者baidu一下,好多这样的问题,解决的方法都是修改php.ini,把allow_url_fope 阅读全文
posted @ 2012-08-15 16:21 F.W.C 阅读(629) 评论(0) 推荐(0) 编辑
摘要: <html><head><title>计算本周开始结束日期</title></head><body><formmethod="post"action="./index.html"enctype="utf-8"><table><tr><td>输入年份</td><td><inputname="year"type="text"maxlength=&quo 阅读全文
posted @ 2012-06-25 18:38 F.W.C 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 有6个关键点使用字符clinent connection database results server system可以通过在mysql控制台下输入:show variables lilke ‘character_set_%’;查看mysql4.1 以后版本都支持多字符集的支持,但是安装默认的字符集竟然是latin1这个瑞典文,所以很多人想安装discuz等论坛为gbk、utf-8等字符集的 论坛就出现了一些问题。最近我在网上找了一些资料,加上自己又专门在一台linux服务器上试验了两天的经历,基本解决了字符集的问题,现将我的心得写出 来,供广大网游参考。 一、原理篇: mysql服务... 阅读全文
posted @ 2012-06-07 11:40 F.W.C 阅读(983) 评论(0) 推荐(0) 编辑
摘要: MySQL对中文的支持程度还是很有限的,尤其是新手,但凡出现乱码问题,就会头大。乱码问题1:用PHPmyAdmin操作MySQL数据库汉字显示正常,但用PHP网页显示MySQL数据时所有汉字都变成了?号。 症状:用PHPmyAdmin输入汉字正常,但当PHP网页显示MySQL数据时汉字就变成了?号,并且有多少个汉字就有多少个?号。 原因:没有在PHP网页中用代码告诉MySQL该以什么字符集输出汉字。 解决方法: 1.网页文件head设置编码<metahttp-equiv="Content-Type"content="text/html;charset=utf 阅读全文
posted @ 2012-06-06 10:38 F.W.C 阅读(1604) 评论(0) 推荐(0) 编辑
摘要: www.domain.com直接到根目录下别的二级域名如xyz.domain.com到根目录下的xyz目录。实现:配置apache的http.conf文件,->取消164行LoadModule rewrite_module modules/mod_rewrite.so前的#号->文件最后RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.xieye\.com$ RewriteRule ^(.+) /$1 [L]RewriteCond %{HTTP_HOST} [^.]+\.xieye\.com$ RewriteRule ^(.+) %{H 阅读全文
posted @ 2012-05-20 10:54 F.W.C 阅读(253) 评论(0) 推荐(0) 编辑
摘要: http://www.xqs.cn 阅读全文
posted @ 2012-05-17 12:06 F.W.C 阅读(116) 评论(0) 推荐(0) 编辑