On 27/03/2021 16:52, Abdul Haq Sheikh wrote:
- On Index.php, php will automatically include  'vendor/autoload.php'
because the vendor directory exists.
- On Test.php, php will automatically include  'vendor/autoload.php'
because the vendor directory exists.
- On Classes/test2.php, since file is in sub directory and here vendor
directory doesn't exist, so php will not include 'vendor/autoload.php'

Just an observation, but if you're doing vendor/autoload.php from your index.php page, and are not already doing custom include paths, then chances are you have your vendor directory publicly accessible and that is considered unwise.


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to