Lapinator / odsPhpGenerator

odsPhpGenerator is library writen in PHP for generate OpenDocumentSpreadsheet.
https://odsphpgenerator.lapinator.net/
GNU Lesser General Public License v3.0
6 stars 2 forks source link

require_once(../vendor/autoload.php): failed to open stream: #1

Open pvegetah opened 7 years ago

pvegetah commented 7 years ago

I've try to run the example of your program but there's an error state that

Warning: require_once(../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\odsPhpGenerator-0.0.3\examples\CellStyle.php on line 4

Fatal error: require_once(): Failed opening required '../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\odsPhpGenerator-0.0.3\examples\CellStyle.php on line 4

Lapinator commented 7 years ago

hummm

change require_once("../../vendor/autoload.php") by require_once("../../vendor/autoload.php"); and "composer update" in the directory odsPhpGenerator-0.0.3\

kikosoft commented 7 years ago

Or, if you don't want to use composer, and why would you, you could write a little replacement PHP file for the autoload file. In your replacement simply include all the PHP files in the src directory like so:

require_once('../src/ods.php'); require_once('../src/odsDraw.php'); require_once('../src/odsFontFace.php'); require_once('../src/odsStyle.php'); require_once('../src/odsTable.php'); require_once('../src/odsTableCell.php'); require_once('../src/odsTableColumn.php'); require_once('../src/odsTableRow.php');

And you can run the examples without composing anything. Don't forget to replace the require_once(../vendor/autoload.php), in the examples, by your replacement file.