Include files with friendly URL [closed]

1

I'm using friendly URL on my site, I include the files in index.php all correctly, and it works on my file pages/register.php right. >

Only when I access directly with url http://localhost/treinos/pages/register.php

The server accused 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 friendly URL does not acknowledge error, would anyone know why the rays this is happening ...?     

asked by anonymous 18.05.2015 / 04:39

1 answer

0

Try using the default PSR-4 for autoload classes.

    
18.05.2015 / 17:16