fopen / file_get_contents 每次请求都会重新做DNS查询,并不对DNS信息进行缓存。
但是CURL会自动对DNS信息进行缓存。对同一域名下的网页或者图片的请求只需要一次DNS查询。
这大大减少了DNS查询的次数。
所以CURL的性能比fopen / file_get_contents 好很多。
Category: Programming
Which software are useful?
This the software list for android :
* Gmail for android
* Facebook for android
* Twitter for android
* Phone record software
* Today’s weather for android
I found these app for android is good software.
Example:
1. Add menu classify Merchant
2. Add the function in template.php
function YOURTHEMENAME_preprocess_page(&$vars) {
global $user;
if (in_array(‘Merchant’, $user->roles)) {
$vars['nav_links'] = menu_navigation_links(“menu-merchant”);
} elseif (in_array(‘Operator’, $user->roles)) {
}
}
3. Add the code in page.tpl.php
<?php print theme(‘links’, $nav_links, array(‘id’ => ‘features-menu’, ‘class’ => ‘links primary-links’)) ?>


