Questions tagged as 'php-autoload'

0
answers

Problems optimizing login system with autoload

I did an optimization on the login system and as I had problems with directory I decided to search the web and found a legal resource of PHP that is autoload . I did the whole implementation according to the examples I got but I'm having prob...
asked by 16.05.2017 / 04:25
2
answers

How do namespaces work in PHP?

namespaces were implemented from PHP 5.3.0 as a form of "encapsulate items". I've never really understood his real concept, and I always get confused by class autoload . Could someone explain me, in a simple way, how namespaces , why...
asked by 17.12.2015 / 13:23
0
answers

PDO class not found in namespace other than global

I am creating a class that uses PDO, but in a namespace other than global: namespace Classes\Config; use \PDO; class Connection { public static function getConnection() { $dbhost = "algumhost"; $dbuser = "algumuser";...
asked by 13.03.2017 / 19:52
0
answers

Problems with autoload in PHP

I have the following autoload function of classes in my system, it works perfectly in localhost, however when I went up to the server it failed to include the class    Error on line: 47 :: Could not include check.class.php   /home/u291106554/...
asked by 31.05.2016 / 22:25
0
answers

Problem with Composer - PSR-4

I'm studying Composer and its forms of autoload (classmap, file, psr-0, psr-4), however in my example it is appearing with the following error: Fatal error: Class 'Library\Exemplo' not found in/var/www/html/CursoPHP/composer/index.php on line...
asked by 24.09.2015 / 17:10
0
answers

Problem in migration from PSR-0 to PSR-4

I'm new here but I've been programming for more than 10 years in PHP and I'm programming Object Oriented in a short time. Doing some tests I saw that the PSR-0 is deprecated and then a project of mine that I am developing I decided to migrate to...
asked by 14.07.2015 / 20:30
1
answer

Need to install composer on the server? [closed]

I'm studying php and learning how to use autoload and composer. I got a server to use during my studies. Should the server have composer installed for autoload to work?     
asked by 10.12.2018 / 16:47