2
<?php
namespace App\Controller;
class Action {
function mostrarDado(){
echo "Mostrando Dados....";
}
}
<?php
$paramUser = $_GET['usuario'];
$paramSenha = $_GET['senha'];
var_dump($paramUser);
var_dump($paramSenha);
$act = new App\Controller\Action();
var_dump($act->mostrarDado());
?>
<?php
require_once 'vendor/autoload.php';
?>
<html>
<form action="App/Script/Script.php" method="get">
<input name="usuario">
<input name="senha">
<button type="submit"></button>
</form>
</html>
Hello @Alan welcome to Stackoverflow, please add snippets of your code so we can find the problems.
– Lucas Duete
Hello @Lucasduete Thank you!! , posted the above code, I have this doubt regarding how php treats submission formulations, it is certain that I get the get , post , but autoload does not load the instantiation after a submission. Use does nothing for what I’ve been researching, but autoload , does not recognize after a Ubmit , only if I redeclare in the later file. How do I make it recognize even after Submit? without redirecting, by foward itself?
– Alan Web
I’m using Autopload for a project without a framework , only for testing. I’m doing the autoload propagation, from index.php, then to script.php and finally to action.php, with this autoload propagation, without Submit occurs the normal namespace recognition, so when giving a Submit from the index loses-if the require statement for vendor/autload.php.
– Alan Web
With Submit : console: PHP Fatal error: Uncaught Error: Class 'App Controller Action
– Alan Web
Is it correct to say that autoload depends exclusively on my index.php, and that my entire application revolves around a route configuration from or linked to it ? because in my understanding I can take over the request interception for routing, but without losing my link with autoload?
– Alan Web