This post regarding how to autoload classes in PHP without included require method. Some rules you have to follow. 1) The file name must be the class name. Like if you declare a class like SampleClass then your file name should be the same name. 2) If you declare a namespace then your folder name
Tag: php
How to removed index.php from url in CodeIgniter ?
If you want to remove index.php from url then you must follow these steps. Please follow and like us:
How hooks are working in CodeIgniter?
Hooks feature provides a means to tap into and modify the inner workings of the framework without hacking the core files. So, if you want to put a functionality which can run whenever a controller’s function initialized then you should call a function through hooks. The following is a list of available hook points. pre_system Called
What is Laravel Middleware and how to make a custom middleware?
Middleware provides a convenient mechanism for filtering HTTP requests entering your application. For example, Laravel includes a middleware that verifies the user of your application is authenticated. If the user is not authenticated, the middleware will redirect the user to the login screen. However, if the user is authenticated, the middleware will allow the request
What is Namespaces and how it is used?
Namespaces are one of the most significant changes in PHP 5.3.Namespaces are a way of encapsulating items. As the size of your PHP code library increases, the more likely you will accidentally reuse a function or class name that has been declared before. The problem is exacerbated if you attempt to add third-party components or
What is Traits and How it is used?
Traits are one of the biggest addition in the PHP 5.4. In PHP trait is the method of code re-usability.As we know PHP is single inheritance programming language.As per my opinion, the main intention of introducing the trait in PHP is to reduce limitation of code re-usability in PHP single inheritance nature. The structure of
New Important Features in PHP 7
Php 7 gives some important features through which you can really love to use and apply those things to your project So, let’s explore with new features. Please follow and like us: