0

I installed phpspreadsheet into my project using composer and I was trying to run the samples server by command line. The server was working, also shows the index page and sample links but when I click the sample links it says

"The requested resource /C:/xampp/htdocs/bookshelftp/public/vendor/phpoffice/phpspreadsheet/samples/index.php was not found on this server."

I included autoload.php file in my index file also

Sam
  • 195
  • 1
  • 18
  • how did you try to run samples? like `php vendor/phpoffice/phpspreadsheet/samples/Autofilter/10_Autofilter.php`? – Samiul Amin Shanto Jun 26 '18 at 07:07
  • i used this code to run the sample server from phpspreadsheet doc "php -S localhost:8000 -t vendor/phpoffice/phpspreadsheet/samples" and i was trying to run the sample from that server – Sam Jun 26 '18 at 07:41
  • How did you try to access the examples on the server (i.e. which URL did you try to browse)? – xabbuh Jun 26 '18 at 10:04
  • i used localhost:8000, it gives the list of example link on the browser – Sam Jun 26 '18 at 10:12

1 Answers1

0

I ran into the same problem. I fixed it by editing Header.php (directly under the 'samples' directory) line 9 with this: require_once __DIR__ . '/../src/Bootstrap.php'; That 'Bootstrap.php' file, which is supposed to be there when you install with composer and "--prefer-source" did NOT get installed, so I had to copy it from a downloaded version and put it under the 'src' directory. One would think this would not have been as error-prone as it is, but it is a free product and pretty robust when you get it working.

McAuley
  • 413
  • 1
  • 3
  • 13