-1

Please explain what is the cause of the error could be..?

I can not see the class but, I didn't see any require error

    var_dump(12);
    require('http://dev.credicom.de/spreadsheet/php-excel-reader/excel_reader2.php');
    require('http://dev.credicom.de/spreadsheet/SpreadsheetReader.php'); 

    $Reader = new SpreadsheetReader();
    foreach ($Reader as $Row)
    {
        print_r($Row);
    }
    die('priehali');

I am getting the following error :

 Fatal error: Class 'Spreadsheet\SpreadsheetReader' not found in /www/htdocs/w00e163f/credicom.de.dev/content/importExcel.php on line 14
Kedar Udupa
  • 544
  • 9
  • 27
user9660776
  • 31
  • 1
  • 1
  • 3

1 Answers1

0

require should have the physical path to the file, not the URL

require(__DIR__.'excel_reader2.php');
  • [How to include a remote file in PHP](https://stackoverflow.com/questions/1158348/including-a-remote-file-in-php) – hassan May 16 '18 at 07:44
  • require('/www/htdocs/w00e163f/credicom.de.dev/spreadsheet/SpreadsheetReader.php'); Tha same error – user9660776 May 16 '18 at 07:46
  • what is the current location of your file? if your file in "/www/htdocs/w00e163f/credicom.de.dev/" The require should be require('./spreadsheet/SpreadsheetReader.php'); – Omar Abu Omar May 16 '18 at 07:48
  • Unless [allow_url_include](https://secure.php.net/manual/en/filesystem.configuration.php#ini.allow-url-include) is set – brombeer May 16 '18 at 07:52