construction is a special function of a class that is automatically executed whenever an object of class instantiated.
In PHP5 constructor name will be __construct(). previous versions of php constructor name will be the name of the class.
construction is a special function of a class that is automatically executed whenever an object of class instantiated.
In PHP5 constructor name will be __construct(). previous versions of php constructor name will be the name of the class.
To create an object use the keyword ‘new’.
Syntax
——
$new_obj=new classname();
#)class is user defined data type.
#) It contains attributes data members and methods.
#) For creating class use the keyword “class” followed by name of the class.
#) body of the class is placed between two curly braces and inside this we will add datamembers and functions.
Syntax for creating class
class
}
Please see the example below. i will explain one situation it will happen
Suppose i have 3 resource units
Resource-one |
Resource-two | here if you give ID as “users” for all the three
Resource-three |
IN PBA create 3 service plan and add resource rates value as different like 4,5,6.see below
Resource-one-SP | resource rate value inc/min/max as 4
Resource-two-SP | resource rate value inc/min/max as 5
Resource-three-SP | resource rate value inc/min/max as 6
in the above scenario all the resource unit will upadating to same value what you are purchasing from store.
it will work properly if you give different id for resource unit in package.
NOTE:same id in resource tab will create problem.
For destroying all sessions use the following
session_destroy()
Destroying a single session variable use the below unset function
unset($_SESSION[‘myval’]);
Note:if you are using a session in a php page always use the session_start(); at the begining of the php page.