获取网站根目录的方法有几种如:Server.MapPath(Request.ServerVariables["PATH_INFO"]) Server.MapPath("/") Server.MapPath("~/")//当前代码文件所在的根目录路径 Server.MapPath("")//...
分类:
Web程序 时间:
2014-08-19 23:46:35
阅读次数:
541
域名跳转 将xxx.cn定向到www.xxx.comdim querys,UrlsUrls = "http://www.xxx.com"&Request.ServerVariables("PATH_INFO")querys = Request.ServerVariables("QUERY_STRIN...
分类:
Web程序 时间:
2014-08-19 18:11:15
阅读次数:
194
Request.ServerVariables["Url"] 返回服务器地址Request.ServerVariables["Path_Info"] 客户端提供的路径信息Request.ServerVariables["Appl_Physical_Path"] 与应用程序元数据库路径相应的物理路径R...
分类:
其他好文 时间:
2014-08-08 12:09:15
阅读次数:
190
路由这部分貌似在实际工作中没有怎么设计过,只是在用默认的设置,在手册里面看到部分,艰涩难懂。1.路由定义要使用路由功能需要支持PATH_INFO,PATH_INFO是什么呢?手册中提到“要使用路由功能,前提是你的URL支持PATH_INFO(或者兼容URL模式也可以,采用普通URL模式的情况下不支持...
分类:
Web程序 时间:
2014-07-30 09:48:13
阅读次数:
298
nginx 默认不支持PATH_INFO 那么不能正常使用CI。 更改nginx.conf 配置 server { listen 80; server_name localhost; index index.php index.html index.htm; root /Users/renfrank/Sites/; location ~ \.php{ fa...
分类:
其他好文 时间:
2014-07-23 14:01:36
阅读次数:
243
在使用的是 Template(open(file)) 引入的 html, 在处理静态文件的时候,怎么处理图片?可以这样:def imgFile(environ, start_response): ext = environ['PATH_INFO'].split('.') for n in...
分类:
编程语言 时间:
2014-07-03 06:39:21
阅读次数:
220
Request.ServerVariables["Url"]
返回服务器地址Request.ServerVariables["Path_Info"]
客户端提供的路径信息Request.ServerVariables["Appl_Physical_Path"] 与应用程序元数据库路径相应的物理路径R...
分类:
Web程序 时间:
2014-06-29 15:17:00
阅读次数:
271
如果开启FastCGI模式,.htaccess无法生效,一直提示no input file specified。
因为在Fastcgi模式下,php不支持rewrite的目标网址的PATH_INFO的解析
ThinkPHP运行在URL_MODEL=2时,会出现 No input file specified.的情况,
这时可以修改网站目录的.htaccess文件:(by default7...
分类:
其他好文 时间:
2014-06-25 00:23:53
阅读次数:
209
Request.ServerVariables("Url")返回服务器地址Request.ServerVariables("Path_Info")客户端提供的路径信息Request.ServerVariables("Appl_Physical_Path")与应用程序元数据库路径相应的物理路径Requ...
分类:
其他好文 时间:
2014-06-15 22:28:53
阅读次数:
265
<?php
/**
* 文件操作(生成日志)支持多条插入
* (如果插入多条语句并换行 用','逗号分开)
*
*/
class log {
public $path = './info.txt'; //默认值文件
public $mode = 'a'; //默认追加写
public $content = '默认值:空'; //默认内容是 空
public ...
分类:
Web程序 时间:
2014-06-02 02:35:45
阅读次数:
231