0

I have a problem in PHP

Fatal error: Class not found in C:\xampp\htdocs.

In my sumber.php file theres a class Hope.

Please help me thanks

<?php 
   // include('cekSession.php');
?>

<div ui-content-for="title">
<span>Book APPT</span>
</div>

<div class="scrollable">
<div class="scrollable-content">
<div class="section">

<?php 
  $sumberData = new Hope();
  $ListDoctor = $sumberData->getListDoctor();

  print_r($a);
?>
Jakub Matczak
  • 15,341
  • 5
  • 46
  • 64
topan
  • 9
  • 1
  • 2

1 Answers1

0

You need to include or require the file which contains your Class definition.

Any of the following will be suitable, which one you use depends on whether you need to be notified if the file was / wasn't found.

See This question and Answer for an example

<?php
    //include 'sumber.php';
    //require 'sumber.php';
    //include_once 'sumber.php';
    //require_once 'sumber.php';
Community
  • 1
  • 1
Luke
  • 3,481
  • 6
  • 39
  • 63