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

OK - So I do not know if I have gone off on the right path or not, but while reading this post on Stackoverflow, https://stackoverflow.com/questions/4919...st-request, I noticed one of the comments on one of the answers:

“In my case, my form had action="mysite.com/somefolder and that caused the $_POST to be empty. But when I changed the action to mysite.com/somefolder/ it worked as expected.”

And then I see that in CI4 (as opposed to CI3) the URLs/URIs are indeed missing that trailing slash in the server variables ($_SERVER):

CI4
[SCRIPT_URL] => /verification/activation
[SCRIPT_URI] => http://test.mysite.com/verification/activation
[REQUEST_URI] => /verification/activation

CI3
[SCRIPT_URL] => /dev/verification/activation/
[SCRIPT_URI] => http://test.mysite.com/dev/verification/activation/
[REQUEST_URI] => /dev/verification/activation/

Could this be the problem? Why/how would the trailing slash be removed? (I checked the C++ app and it DOES include the trailing slash in the url to which it posts the data.)
Reply


Messages In This Thread
RE: Capturing post data from C++ application in Codeigniter 4 - by junosapien - 05-23-2022, 03:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB