Welcome Guest, Not a member yet? Register   Sign In
Capturing post data from C++ application in Codeigniter 4
#10

If you're using Apache as your web server, then commenting out the .htaccess directives makes a difference, and then the backslash at the end of the URI won't matter.

For the test/dev server (php spark serve), the backslash has no effect on route processing.
PHP Code:
$routes->get('form', static function() {
   return 
'<form method="post" action="/form/post/">
        <input type="text" name="a" value="b" />
        <input type="submit" />
</form>'
;
});

$routes->post('form/post', static function() {
   
dd(
       
Services::request()->getPost(),
       
Services::request()->getMethod(),
       
Services::request()->getUri()->getPath(),
   );
}); 
Try checking the routes above with php spark serve
Reply


Messages In This Thread
RE: Capturing post data from C++ application in Codeigniter 4 - by iRedds - 05-24-2022, 06:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB