Web lists-archives.com

Re: [PHP] Detect php filepath





On 28 September 2016 14:37:46 BST, Narcis Garcia <informatica@xxxxxxxxx> wrote:
>El 28/09/16 a les 15:29, Ashley Sheridan ha escrit:
>> 
>> 
>> What's wrong with using one of the PSR autoloading methods for your
>plugin? That would be far more universal, as you could then treat it as
>any other plugin/module/tool installed with composer.
>> 
>> Also, please try not to to post, it breaks formatting for the web
>archive and goes against the list rules.
>> 
>> Thanks,
>> Ash
>> 
>
>I don't know that "PSR" style. I already have developed my code to
>select files, language files and customized files to include in a
>convenient combined way.
>I see __FILE__ as necessary to use relative paths from plugin's main
>index.php


Have a look at http://www.php-fig.org/psr/psr-4/. It helps solve the issues of loading in required files based on your code attempting to use something not yet included. I think it might be useful here, as it would remove the need for you to need to know where things are in relation to your main code in order to include the right files.

Thanks
Ash
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php