【www.hj8828.com】JavaScript学习笔记之获取当前目录的实现代码_javascript技巧_脚本之家

复制代码 代码如下:function
GetCurrentDirectory() { var curHref = location.href; var curArray =
locHref.split; delete curArray[curArray.length – 1]; var curdir =
curArray.join; return curdir; }

www.hj8828.com,curdir = os.path.dirname(__file__)

演示文件 ‘code.py’:

4,如果您需要在mod_wsgi中使用sessions,您可以改变您的代码如下:

 application = web.application(urls, globals()).wsgifunc()

 return “Hello, world.”

 <Directory /var/www/webpy-app/>

. 它将安装一个’.so’的模块到您的apache
模块文件夹: /usr/lib64/httpd/modules/

app = web.application(urls, globals())

 urls = ( ‘/.*’, ‘hello’, )

AllowOverride None
Options None
Order deny,allow
Allow from all

 def GET(self):

</Directory>