($sid) { session_delete(array('sid' => $sid)); session_data_delete(array('sid' => $sid)); return TRUE; } function sess_gc($maxlifetime) { global $time; $expiry = $time - $maxlifetime; $arrlist = session_find(array('last_date' => array('<' => $expiry)), array(), 1, 10000, '', array('sid', 'bigdata', 'last_date')); if (!$arrlist) return TRUE; $expiry = $time - 21600; // 超6小时未提交丢弃上传图片和附件 $sidarr = array(); foreach ($arrlist as $val) { if ($val['last_date'] > $expiry && $val['bigdata']) continue; $sidarr[] = $val['sid']; } if (empty($sidarr)) return TRUE; session_delete(array('sid' => $sidarr)); session_data_delete(array('sid' => $sidarr)); return TRUE; } function sess_start() { global $conf, $sid, $g_session; ini_set('session.name', $conf['cookie_pre'] . 'sid'); ini_set('session.use_cookies', TRUE); ini_set('session.use_only_cookies', TRUE); ini_set('session.cookie_domain', $conf['cookie_domain']); // 为空则表示当前目录和子目录 ini_set('session.cookie_path', $conf['cookie_path']); // 打开后只有通过 https 才有效 ini_set('session.cookie_secure', FALSE); ini_set('session.cookie_lifetime', 8640000); // 打开后 js 获取不到 HTTP 设置的 cookie, 有效防止 XSS,对于安全很重要,除非有 BUG,否则不要关闭。 ini_set('session.cookie_httponly', TRUE); // 活动时间 ini_set('session.gc_maxlifetime', $conf['online_hold_time']); // 垃圾回收概率 = gc_probability/gc_divisor ini_set('session.gc_probability', 1); // 垃圾回收时间 5 秒,在线人数 * 10 / 每1000个请求回收一次垃圾 ini_set('session.gc_divisor', 1000); session_set_save_handler('sess_open', 'sess_close', 'sess_read', 'sess_write', 'sess_destroy', 'sess_gc'); // register_shutdown_function 会丢失当前目录,需要 chdir(APP_PATH) $conf['url_rewrite_on'] > 1 and function_exists('chdir') and chdir(APP_PATH); // 这个必须有,否则 ZEND 会提前释放 $db 资源 register_shutdown_function('session_write_close'); session_start(); $sid = session_id(); return $sid; } // 刷新页面清理附件缓存 废弃 function sess_clear_attach() { global $sid, $time; $arr = session_read($sid); if (!$arr || 0 == $arr['bigdata']) return TRUE; session_update($sid, array('bigdata' => 0, 'last_date' => $time)); session_data_delete(array('sid' => $sid)); return TRUE; } function online_count() { return session_count(); } function online_list_cache() { static $cache = array(); $key = 'online_list'; if (isset($cache[$key])) return $cache[$key]; $cache[$key] = cache_get($key); if (NULL === $cache[$key]) { $cache[$key] = session_find(array('uid' => array('>' => 0)), array('last_date' => -1), 1, 1000); foreach ($cache[$key] as &$online) { $user = user_read_cache($online['uid']); $online['username'] = $user['username']; $online['gid'] = $user['gid']; $online['ip_fmt'] = safe_long2ip($online['ip']); $online['last_date_fmt'] = date('Y-n-j H:i', $online['last_date']); } cache_set('online_list', $cache[$key], 300); } return $cache[$key]; } function online_user_list_cache() { static $cache = array(); $key = 'online_user_list'; if (isset($cache[$key])) return $cache[$key]; $cache[$key] = cache_get($key); if (NULL === $cache[$key]) { $cache[$key] = session_find(array('uid' => array('>' => 0)), array(), 1, 1000, 'uid', array('uid')); cache_set('online_user_list', $cache[$key], 300); } return $cache[$key]; } ?>spend的用法和例句|江阴雨辰互联

spend的用法和例句

spend的用法和例句


2024年5月11日发(作者:安卓驱动精灵app)

spend的用法和例句

spend有花费;浪费;度过;用尽等意思,那么你知道spend的用法吗?下面跟着 一起来

学习一下,希望对大家的学习有所帮助!

spend的用法大全:

spend的用法1:spend的基本意思是“花费时间、精力或金钱”,可指人使用、花费

金钱,度过时光,也可指某人、物、事使尽〔耗光〕力量、能量、弹药等,还可指人在某物、

事方面花费金钱、精力、时间等。

spend的用法2:spend可用作不及物动词,也可用作及物动词。用作及物动词时,只

能以人作主语,接名词、代词作宾语。可用于被动结构。

spend的用法3:spend的宾语后可接动词不定式,表示目的,作状语。

spend的用法4:spend的宾语后常可接以介词in〔on,for〕引导的短语表示“把…

花在…上”,介词宾语可以是名词,也可以是动名词。以动名词作宾语时介词in常可省

略,尤其在口语中。

spend的用法5:spend可用于“主+谓+宾+主补”结构,主语补足语可由形容词或过

去分词充当。

spend的用法6:对于“spend sth+ v -ing”结构,语法学家认识不一,有人主张 v -ing

是现在分词,在句中作主语补足语(比照本结构可用形容词、过去分词作主语补足语); 有人主

张 v -ing是动名词,其前省略了介词in〔on〕。

1

spend的常用短语:

spend for (v.+prep.)

spend in (v.+prep.)

spend on (v.+prep.)

spend up (v.+adv.)

spend的用法例句:

1. I can't think of a worse way to spend my time.

我想不出更糟的消磨时间的办法。

2. Novello says college students will spend $4.2 billion yearly on alcoholic

beverages.

诺韦洛说大学生每年在酒精饮品上会消费掉42亿美元。

3. Businesses need to train their workers better, and spend more on R&D.

各企业需要更好地培训工人,并且在研发方面加大投入。

4. Slow music encourages supermarket-shoppers to browse longer but

2

spendmore.

舒缓的音乐会促使超市购物者花更长的时间浏览商品的同时花更多的钱。

5. She has yet to spend a Christmas with her husband.

她还从没和她的丈夫一起过过圣诞节。

6. I wanted to spend Sundays holed up together in our flat.

我希望可以一起窝在我们的公寓里度过每个周日。

7. People complain about how children spend so much time on computer

games.

人们常抱怨孩子花太多时间玩电脑游戏。

8. They will then have more money to spend on other things.

这样他们就可以有更多的钱花在其他地方。

9. She probably had more money but she didn't spend it.

她或许有更多的钱,但是她没花过。

10. Kate had invited Alan to spend the Passover with her.

3

凯特已经邀请了艾伦和她一起过逾越节。

11. It was obscene to spend millions producing unwanted food.

耗资数百万去生产一些不需要的食品,真是令人发指。

12. The couple seem to spend less and less time together.

两口子在一起的时间似乎越来越少。

13. I spend all day running around after the family.

我一整天都跟着这家人跑来跑去。

14. The private sector, by contrast, has plenty of money to spend.

相比之下,私营部门就有很多钱可供开销。

15. He had to spend two years bedridden with an injury.

他因伤不得不卧床两年。

4


发布者:admin,转转请注明出处:http://www.yc00.com/num/1715398792a2612206.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信