Class not found when loading a library |
Hi, I have some libraries created under a subdirectory inside Library folder:
../app/Libraries/commonLibraries/ Inside this folder, i have 10 different libraries that i will use in a lot of parts of the web application. The problem is that inside a library y may have different classes, and i would like to initialize this classes (the classes names are different of the file name) Example: I have a library that is: /app/Libraries/commonLibraries/FileDoSomething.php Inside this library, i have a class defined that is : class anythingToDo{ ... } How can i create an object anythingToDo in another part of the project that is not in the FileDoSomething?
(03-15-2021, 05:25 AM)fedeburo Wrote: Inside this library, i have a class defined that is : Have you tried: PHP Code: $todo = new anythingToDo(); (03-22-2021, 08:37 AM)Kaosweaver Wrote:This is not working. The vs code catches the class, but when executing the function in the explorer says class not found(03-15-2021, 05:25 AM)fedeburo Wrote: Inside this library, i have a class defined that is : PHP Code: $todo = new App\Libraries\commonLibraries\FileDoSomething(); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |