Skip to content

Commit 8bf591b

Browse files
committed
docs: fix sample code
Fix incorrect results.
1 parent 0678da2 commit 8bf591b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • user_guide_src/source/incoming/incomingrequest

user_guide_src/source/incoming/incomingrequest/021.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
echo $uri->getUserInfo(); // snoopy:password
88
echo $uri->getHost(); // example.com
99
echo $uri->getPort(); // 88
10-
echo $uri->getPath(); // /path/to/page
10+
echo $uri->getPath(); // path/to/page
1111
echo $uri->getQuery(); // foo=bar&bar=baz
12-
echo $uri->getSegments(); // ['path', 'to', 'page']
13-
echo $uri->getSegment(1); // 'path'
12+
print_r($uri->getSegments()); // Array ( [0] => path [1] => to [2] => page )
13+
echo $uri->getSegment(1); // path
1414
echo $uri->getTotalSegments(); // 3

0 commit comments

Comments
 (0)