File tree Expand file tree Collapse file tree
user_guide_src/source/helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,17 +98,20 @@ The following functions are available:
9898 :returns: The current URL
9999 :rtype: string|\\ CodeIgniter\\ HTTP\\ URI
100100
101- Returns the full URL (including segments) of the page being currently viewed.
101+ Returns the full URL of the page being currently viewed.
102+ When returning string, the query and fragment parts of the URL are removed.
103+ When returning URI, the query and fragment parts are preserved.
102104
103105 However for security reasons, it is created based on the ``Config\App `` settings,
104106 and not intended to match the browser URL.
105107
106108 Since v4.3.0, if you set ``Config\App::$allowedHostnames ``,
107109 this returns the URL with the hostname set in it if the current URL matches.
108110
109- .. note :: Calling this function is the same as doing this:
111+ .. note :: Calling ``current_url()`` is the same as doing this:
110112
111113 .. literalinclude :: url_helper/006.php
114+ :lines: 2-
112115
113116 .. important :: Prior to v4.1.2, this function had a bug causing it to ignore the configuration on ``Config\App::$indexPage``.
114117
You can’t perform that action at this time.
0 commit comments