开源界的一盏明灯!
Aug 29

.htaccess文件在apache中的配置

分类:apache相关, 项目案例 | 给我留言 | 点击量85次

中设置虚拟目录.

如:
<VirtualHost 192.168.18.4:80>
    ServerAdmin admin@system.com
    DocumentRoot D:\usr\webroot\tiffany
    ServerName www.tiffany4.com          
    ErrorLog logs/dummy-host.example.com-error_log
   CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

此时我们在D:\usr\webroot\tiffany\的根目录下放置了.htaccess文件来实现301.404重定向问题

如果出现这一情况:

没有报.htaccess文件的错误,感觉此文件好象无效,被过滤了.

怎么调试编写.htaccess文件也没有作用的情况,

那么可能的原因就是总没有识别此文件,

需要修改中的httpd.conf文件如下:

<VirtualHost 192.168.18.4:80>
    ServerAdmin admin@system
    DocumentRoot D:\usr\webroot\tiffany
    AccessFileName .htaccess
    ServerName www.tiffany4.com
    <Directory “D:/usr/webroot/tiffany”>
             Options FollowSymLinks
             AllowOverride All
             Order deny,allow
             allow from all
    Satisfy all
  </Directory>
     
    ErrorLog logs/dummy-host.example.com-error_log
   CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

Aug 27

PHP删除特定数组内容并且重建数组索引的方法

分类:php前沿 | 给我留言(1 条留言) | 点击量89次

/*
* 删除数据中的一个元素 ,并重建索引
* $arr:要删除元素的数组
* $offset:要删除元素的索引
*/
function
 array_remove(&$arr,$offset){  
    array_splice($arr,$offset,1);  
}  

Aug 15

8月12号聚餐一景

分类:八卦人生 | 给我留言(2 条留言) | 点击量152次

带着无比眷恋之情踏上了欢送英子的聚餐道路上

先来个主角”特写”,嘻嘻~~,摄影师”小/jump木同”人生一大失败,使小小的我挡在了主角的前面为她护航.

再来一张主角笑脸展示图. (阅读更多精彩内容…)

Aug 14

网络营销联盟之Affiliate

分类:杂谈天地, 项目案例 | 给我留言 | 点击量120次

Affiliate Program它是联盟营销的载体


Affiliate program
的原理:

        网站主A上列出许多广告连接,这些广告连接被其他网站主B放到自己的网站上展示出来,

    当浏览的用户C点击网站主B上的这些展示的广告后,跳转到网站主A上面,那么这浏览的用户C

       就算作是网站主B给牵引过来了.

        按照联盟营销模式(CPA-Cost Per Action, 按效果付费;),网站主B应该能从网站主A这里

    按照协议获得佣金.而这一切全建立在网站主A的一套后台程序Affiliate

  (阅读更多精彩内容…)

Aug 08

The international card payment solutions

分类:NPS 网上支付, 网上商城B2C | 给我留言 | 点击量136次
1, International cards payment process
Click on “the IPS international card payment “, chooses the payment way of VISA, MasterCard or the JCBInput your international card number, term of validity, CVV2 and your name, IPS will connect the relevant bank to check whether your international card has already registered ” the 3D verification ” serviceTransaction processing, please wait… (Connecting the bank, encryption transmitting), or Transaction Proceeding, Please Wait… (Connecting the bank, encryption transmitting)Then will appear the “verified by VISA ” window from the relevant bank, please check whether your personal guarantee information is correct or not, in order to confirm that you are proceeding the transaction with the relevant bank, and then input and submit your “verified by VISA” codeAfter the verification, the relevant bank will confirm your payment, if successful, immediately will pop up the Taking goods page provided by the shopping website2, International cards payment Q&A

Why can’t my card pay normally?

If your VISA, MASTER, the JCB card in hand is effective, the main reason is that you have not done the 3D verification. The so-called 3d verification is free service provided by the credit card company to guarantee the secure online shopping for customers. You may directly request your sending card bank to add this kind of service by telephone. In terms of VISA card, this service is called verified by visa service, and in terms of MasterCard it is called MasterCard secure code service and J/Secure service in terms of JCB card. Actually this will provides you with one secure code to guarantee your personally use of this card, and to avoid the occurrence of fraud.

Whether secured code service charges or not ?
It does not charge any fee to increase this service.

Why is the net speedvery slow during the payment?

When you submit your credit card information, the IPS platform is verifying the identity to the relevant bank through 128 key encryption,.Moreover, if your credit card is issued by an overseas bank, the network itself will also delay certain time about 10 seconds.

How to make the secure verification for my payment card?

You can apply for the secure payment verification on line.

The user holding the VISA card may directly enter http://www.visa.com/globalgateway/gg_selectcountry.html?retcountry=1 page to choose your national page to carry on the application. Usually enter the personal option and then choose visa security service. Then application is allowed on line. Certainly you can also use search engine, for instance fill visacard and English name of your coyntry at www.google.com and carrie on a fast search, then carrieon visa security search in our country visacard search engine page. The English customer may directly enter the http://www.visaeurope.com/iusevisa/uk.html page to apply, the American customer may directly enter the https://usa.visa.com/personal/security/vbv/index.html page to apply while the Canadian customer may directly enter the http://www.visa.ca/verified/card_howto.cfm page

The MASTER card usercan directly enter http://www.mastercard.com/us/index.html to choose the corresponding country to carry on this application in the page of your nation. Usuallychoose the mastercard secure code service option in cardholder service. Certainly you can also use search engine. For instance, fill in mastercard and your nation’s English name in www.google.com to carry on the fast search, then directly seeks secure code or safe shopping online in national mastercard search page.

The JCB card user may directly enter http://www.jcb.co.jp/Jsecure/whats.html#shikumi to examine the instruction of J/Secure.

 
Jul 25

淘宝首页的疑问

分类:seo技术专栏 | 给我留言 | 点击量146次

想想也是淘宝首页有两百多K还不包含JS和样式,但是我们打开却很快,到底是为什么呢,生成静态?缓存?……有很大的疑问,今天网上找了老半天才得到答案:加速!

C:\Documents and Settings\Administrator>ping www.taobao.com

Pinging www.gslb.taobao.com [60.12.195.20] with 32 bytes of data:

Reply from 60.12.195.20: bytes=32 time=42ms TTL=239
Reply from 60.12.195.20: bytes=32 time=76ms TTL=239
Reply from 60.12.195.20: bytes=32 time=106ms TTL=239
你ping www.taobao.com 那么将被重定向到一个距离你最近的服务器..而不是真正的 www.taobao.com
我这里被重定向到 www.gslb.taobao.com

的全称是Content Delivery Network,即内容分发网络。其目的是通过在现有的Internet中增加一层新的网络架构,将网站的内容发布到最接近用户的网络”边缘”,使用户可以就近取得所需的内容,解决Internet网络拥挤的状况,提高用户访问网 站的响应速度。从技术上全面解决由于网络带宽小、用户访问量大、网点分布不均等原因所造成的用户访问网站响应速度慢的问题。

Jul 25

关于“建立HTTP长连接”的考虑!

分类:php前沿 | 给我留言 | 点击量157次

今天在CSDN论坛上看一个主题,如何建立的长连接,下面好多人给出了回答,这里把实现方法粘下,大家讨论下:
服务端:
<?php
$filename  = dirname(__FILE__).’/data.txt’;

// store new message in the file
$msg = isset($_GET['msg']) ? $_GET['msg'] : ”;
if ($msg != ”)
{
  file_put_contents($filename,$msg);
  die();
}
// infinite loop until the data file is not modified
$lastmodif    = isset($_GET['timestamp']) ? $_GET['timestamp'] : 0;
$currentmodif = filemtime($filename);
while ($currentmodif <= $lastmodif) // check if the data file has been modified
{
  usleep(10000); // sleep 10ms to unload the CPU
  clearstatcache(); //清除文件状态缓存
  $currentmodif = filemtime($filename);
}
// return a json array
$response = array();
$response['msg']      = file_get_contents($filename);
$response['timestamp'] = $currentmodif;
echo json_encode($response);
flush(); //刷新输出缓冲
?>
客户端用AJAX提交,主要用于在线聊天等实时系统~!

LOGO图片