php - Problem in accessing function of a class -


This is my index.php that I am calling command getresellers Reseller class $ _ command = $ _ request ['_command'] of the matching function; $ Dbs = new database (); Switch ($ _ command) {case 'getresellerscount': $ rd = New Resellerdashboard ($ dbs); Echo $ msg = $ rd- & gt; Receptive number (); // Resonance Config :: Jason_format ($ msg); // Go out; break; Case 'merge' seller: $ rd = new reseller ($ dbs); Echo $ msg = $ rd- & gt; Sociable (); // Resonance Config :: Jason_format ($ msg); // Go out; break; Default:} Include function __autoload ($ class_name) {$ class_name '.php'; }

This is my reseller class who wants to call the reseller dashboard class function but the error is occurring

  class reseller {Private $ dbs; Public function __ composition (database $ dbs) {$ this- & gt; Dbs = $ dbs; } / ** * * Work to get resellers * ** / When getting public function () {list ($ fromdate, $ todate) = ResellerDashBoard :: getdate (); $ Data_query = "select firstname, lastname, mobile, e-mail, tmecode, tmename, updatedon, apptype, alloctype, where empparent = tbl_reseller_dashboard_intermediate to empparent '". Get $ _ ['city'] "'". $ Bet "And updatedon> = ''. $ _ Request ['sender']." 00:00:00 'and updated & lt; = '". $ _ Request [' todate ']." 23:59:59' '; $ Result = $ this- & gt; Dbs-> Resellerdashboarddb-> GetResult ($ city); }}   

An error is taking place

  & lt; Br / & gt; & Lt; P & gt; Warning & lt; / P>: Included (ResellerDashBoard.php) [& lt; A href = 'function.include' & gt; Function.include & lt; / A & gt;]: Failed to open the stream: a file like this or a directory in & lt; P & gt; /home/abhijitnair/sandbox/newresellerdashboard/api/index.php< / P & gt; On the line & lt; B & gt; 38 & lt; / B & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; P & gt; Warning & lt; / P & gt;: (included) [& lt; A href = 'function.include' & gt; Function.include & lt; / A & gt;]: To include the failed opening 'ResellerDashBoard.php' (include_path = '.: / Usr / local / lib / php') & lt; B & gt; /home/abhijitnair/sandbox/newresellerdashboard/api/index.php< / B & gt; On the line & lt; B & gt; 38 & lt; / B & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; P & gt; Serious error & lt; / P & gt;: Class 'ResellerDashBoard' was not found in & lt; P & gt; /home/abhijitnair/sandbox/newresellerdashboard/api/Reseller.php< / P & gt; On the line & lt; B & gt; 45 & lt; / B & gt; & Lt; Br / & gt;   

Please do I need to use the reseller dashboard function?

The problem should be clearly obvious first. Include "ResellerDashBoard.php" failed to open the stream: "Do not have any such file or directory" ... Make sure the files are where they are ... in your current work directory, or specify the full file path in your autoloader Please.

Then check that the current working directory is using the folder that getcwd ()

do not forget, check file permissions / privileges.

Comments