File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ private function removePhpUrl($url)
7474 */
7575 private function convertParm ($ parm )
7676 {
77+ // If Same parm
78+ if (strcmp ($ _SERVER ['REQUEST_URI ' ], $ parm )) {
79+ return $ parm ;
80+ }
81+
7782 $ replaceParm = $ parm ;
7883 $ count = preg_match_all ('/{/u ' , $ parm );
7984 for ($ dataEnd = 0 , $ end = 0 , $ i = 0 ; $ i < $ count ; ++$ i ) {
Original file line number Diff line number Diff line change 33
44$ app = new phpExpress ();
55
6- // Request : http://localhost:3000/test/get.test.php/3/r/good/d
7- // Result : 3rd
8- $ app ->get ('/{id}/{text}/good/{text2} ' , static function ($ req ) {
6+ // Request : http://localhost:3000/test/get.test.php/3/get
7+ // Result : 3
8+ $ app ->get ('/{id}/get ' , static function ($ req ) {
99 try {
10- return $ req ["id " ] . $ req [ " text " ] . $ req [ " text2 " ] ;
10+ return $ req ["id " ];
1111 } catch (Exception $ e ) {
1212 http_response_code (500 );
1313 return $ e ;
You can’t perform that action at this time.
0 commit comments