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
相关文档:
在PHP开发中对比起Cookie,session 是存储在服务器端的会话,相对安全,并且不像 Cookie 那样有存储长度限制,本文简单介绍 session 的使用。
由于 Session 是以文本文件形式存储在服务器端的,所以不怕客户端修改 Session 内容。实际上在服务器端的 Session 文件,PHP 自动修改 session 文件的权限,只保留 ......
公司MM时常给我一些号码,然我查询是哪家的,都是txt文本格式的,还好号码是一行一个,于是用file()函数取个数组,开始的时候我的win7 32位的可以用apache后来装64位win7由于没找到原生的64位apache于是就传到服务器上每次,有上传有该文件很麻烦,于是做成一个页面去让MM自己完成.废话不多说 要在form表单里上传文件就得需要在表 ......
之前的程序中,在服务器 error_log 中一直有这么一个错误提示:
[19-Nov-2009 22:44:50] PHP Fatal error: Cannot break/continue 1 level in /home/filename.php on line 160
但程序还是可以继续执行下去。
经查阅资料,有这么一说法:
当不在 LOOP 或 SELECT 逻辑条件中时,请不要用 break/continue 来中 ......
#找到:
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gz ......