Welcome Guest, Not a member yet? Register   Sign In
Autoload function
#6

(This post was last modified: 02-25-2019, 05:34 PM by dave friend.)

(02-25-2019, 10:19 AM)Skinper Wrote: What is the best way to make autoload incldues?
such as:
       include_once (DIR_LIB. "interface / components / TinyMce.php");

Thanks a lot for help!

"Best Way" is subjective and depends on a bunch of factors that require more time to explain that I have time for (Sorry  Blush ), but it mostly boils down to one or more of the following.
  • A full path like you use above
  • A custom autoload function attached to the system by spl_autoload_register
  • A PSR-4 autoloader of the type usually made available to components installed with Composer
Both the second and third option require a logical file system structure and/or using namespaces and "use" commands in your PHP files.
Reply


Messages In This Thread
Autoload function - by Skinper - 02-24-2019, 06:23 AM
RE: Autoload function - by InsiteFX - 02-24-2019, 09:22 AM
RE: Autoload function - by Skinper - 02-24-2019, 02:59 PM
RE: Autoload function - by dave friend - 02-24-2019, 04:01 PM
RE: Autoload function - by Skinper - 02-25-2019, 10:19 AM
RE: Autoload function - by dave friend - 02-25-2019, 05:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB