Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何知道cherrypy中的源url?_Python_Cherrypy - Fatal编程技术网

Python 如何知道cherrypy中的源url?

Python 如何知道cherrypy中的源url?,python,cherrypy,Python,Cherrypy,如何获得cherrypy中的baseurl?我看到一个cherrypy.url(),它提供了整个url“http://mywebaddress.com/currentpage" cherrypy中是否有类似的函数允许我只获取“http://mywebaddress.com"/"http://mywebaddress.com/“无论我在哪条路线上,都要离开吗?退房。这将允许您将URL解析为其组件。cherrypy.request对象具有和属性。链接已过期链接现在看起来很好。

如何获得cherrypy中的baseurl?我看到一个cherrypy.url(),它提供了整个url“http://mywebaddress.com/currentpage"


cherrypy中是否有类似的函数允许我只获取“http://mywebaddress.com"/"http://mywebaddress.com/“无论我在哪条路线上,都要离开吗?

退房。这将允许您将URL解析为其组件。

cherrypy.request对象具有和属性。

链接已过期链接现在看起来很好。