Skip to content

Commit eb527d6

Browse files
committed
docs: fix incorrect output
The getPath() returns the path starting with `/`. But if you set the path `another/path`, it returns `another/path`.
1 parent 9e6fb5d commit eb527d6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • user_guide_src/source/libraries/uri

user_guide_src/source/libraries/uri/016.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
$uri = new \CodeIgniter\HTTP\URI('http://www.example.com/some/path');
44

5-
echo $uri->getPath(); // 'some/path'
6-
echo $uri->setPath('another/path')->getPath(); // 'another/path'
5+
echo $uri->getPath(); // '/some/path'
6+
echo $uri->setPath('/another/path')->getPath(); // '/another/path'

0 commit comments

Comments
 (0)