[SOLVED] - Strange problem with POST data |
(09-24-2020, 08:53 AM)InsiteFX Wrote: In the first place your form tag is wrong it goes by controller/method.Hi Insite, Thanks for the help. In my view, now, there isn't index method. If you look my last post, there is "home/test". Is it wrong? I whant that, when i submit the form, the app going to the method "test" in "home" controller, whith the post data. In route.php i put "$routes->post(etc etc)". Is it right? When i use CI3, i don't put anything in route, i have autoroute enable. I don't understand where is the problem whith ci4....
You don't need the post routes. Leave as default. Do you have index.php in your project url ? In your App Config is your baseurl set? In your .htaccess file did you uncomment rewrite base and add projectFolderName?
(09-24-2020, 11:21 PM)remesses_thegreat Wrote: You don't need the post routes. Leave as default. Do you have index.php in your project url ? In your App Config is your baseurl set? In your .htaccess file did you uncomment rewrite base and add projectFolderName? I have the index.php file in "public" original folder. I don't moved anything after the installation. In the public folder i have this ht access: Code: <IfModule mod_rewrite.c> In the app/config.php: PHP Code: public $baseURL = 'http://www.mysiteinlocal.com/'; Apache document root: /var/www/www-ci4/appstarter/public
Now i deleted my folder appstarter and reinstall all ci4 with command composer create-project codeigniter4/appstarter
In the new clean install, not work.....
Try this:
// App\Controllers\Test PHP Code: <?php // Config\Routes PHP Code: // add these to your existing routes // view_1 PHP Code: Test 1 si post // view_2 PHP Code: Test 2 nessun post
I changed the namespace in controller because with app/controller/test give me error 'App\Controllers\Test\BaseController' not found.
I tried as you suggested, but it still didn't work. The output is (in www.mysite.com/test/send): Code: Test 1 si post thanks anyway for the help, that you're giving me
Oh. The namespace was mistyped.
(09-25-2020, 01:39 PM)paulbalandan Wrote: Oh. The namespace was mistyped.Don't worry Paul... I think that the problem still in my debian box.... At the moment i haven't any idea for the solution... In ci3 i maked 2 web app for my company, there are most of 100000 row of code and i never founded a problem like this.... In this days, i'll rebuild the box, and i'll try another time with ci4.... Thanks to all
(09-23-2020, 06:05 PM)nc03061981 Wrote: You should learn about Routes Learning CI4 from my works, from errors and how to fix bugs in the community Love CI & Thanks CI Teams |
Welcome Guest, Not a member yet? Register Sign In |