1
I’m using URL friendly on my website, I include the files on index.php
everything correctly, and it works in my filing cabinet pages/register.php
straight.
Only when I access directly with the url http://localhost/treinos/pages/register.php
The server accuses me of this error:
Fatal error: Class 'Cadastro' not found in C:\wamp\www\treinos\pages\register.php on line 2
This error only occurs if I directly access the file, it normal including with the URL friendly don’t accuse error, someone would know why the hell this is happening... ?
what the problem ? you want when accessing the file directly, to work include or be blocked?
– Daniel Omine
That works include normally as if you were accessing normal!
– Guilherme Alves
show url rewrite rule.. edit and include in the query
– Daniel Omine
I decided to include in the file
"pages/register.php"
thatrequire_once(dirname(__DIR__)."/modules/Config.php");
require_once(dirname(__DIR__)."/modules/class/Connection.class.php");
require_once(dirname(__DIR__)."/modules/class/Cadastro.class.php");
– Guilherme Alves