PHP 几个路径函数
//
dirname()
// Returns directory name component of path
basename()
// Returns filename component of path
pathinfo()
// Returns information about a file path;
// pathinfo() returns an associative array containing information about path .
parse_url()
// Parse a URL and return its components;
// This function parses a URL and returns an associative array
// containing any of the various components of the URL that are present.
realpath()
// Returns canonicalized absolute pathname;
// realpath() expands all symbolic links and resolves references to '/./', '/../' and
// extra '/' characters in the input path . and return the canonicalized absolute pathname.
http_build_query()
// Generate URL-encoded query string;
// Generates a URL-encoded query string
// from the associative (or indexed) array provided.
http_build_url()
// Build an URL
相关文档:
转贴自: http://hi.baidu.com/isnono/blog/item/3c94ea11a54a0fc7a7ef3f94.html
经常在CSDN的PHP论坛上看到有朋友问处理在线用户的问题,我写过类似的代码,就拿出来献丑了,有点垃圾,基本上实现了功能, 同是也能够扩展,比如同时只允许一个帐号在线等。
/*
程序用途:检测在线用户
程序作者:heiyeluren
写作时间 ......
java中时间戳和时间字符串之间的转换
获取当前的unix时间戳
new Date().getTime()
System.currentTimeMillis()
返回的是毫秒数,要转换long t = System.currentTimeMillis()/1000;
获取当前年月日以及时分秒
Calendar c = Calendar.getInstance();
c.get(Calendar.YEAR)) c.get(Calendar.YEAR)) c.get(C ......
这篇文章的出发点是我对插件机制的理解,及其在PHP中的实现。此方案仅是插件机制在PHP中的实现方案之一,写下来和大家分享,欢迎大家一起讨论。
插件,亦即Plug-in,是指一类特定的功能模块(通常由第三方开发者实现),它的特点是:当你需要它的时候激活它,不需要它的时候禁用/删除它;且无论是激活还是禁用都不影 ......
PHP 发送邮件
作者:w3pop.com 翻译/整理:w3pop.com 发布:2007-04-28 修改:2007-06-17 浏览:14208 :: ::
PHP Sessions
PHP allows you to send e-mails directly from a script.
PHP允许你通过脚本直接发送e-mail。
The PHP mail() Function
PHP mail()函数
The PHP m ......