php - Composer not composing - saying file not found -


i'm using excellent phpwkhtmltopdf library , want update latest version , need use composer.

file structure:

vendor   --mikehaertl     --php-shellcommand     --php-tmpfile   autoload.php 

composer.json file:

{ "name": "mikehaertl/phpwkhtmltopdf", "description": "a slim php wrapper around wkhtmltopdf easy use , clean oop interface", "keywords": ["pdf", "wkhtmltopdf", "wkhtmltoimage" ], "homepage": "http://mikehaertl.github.com/phpwkhtmltopdf/", "type": "library", "license": "mit", "authors": [     {         "name": "michael haertl",         "email": "haertl.mike@gmail.com"     } ], "require": {     "php": ">=5.0.0",     "mikehaertl/php-tmpfile": "1.0.*",     "mikehaertl/php-shellcommand": "1.0.*" }, "autoload": {     "psr-4": {         "mikehaertl\\wkhtmlto\\": "src/"     } }, "extra": {     "branch-alias": {         "dev-master": "2.0.x-dev"     } } } 

i'm trying use library this:

require '/home/bookmark/vendor/autoload.php'; use mikehaertl\wkhtmlto\pdf; ... $pdf = new pdf('http://anysite.com'); <-- error points line 

the problem error:

fatal error: class 'mikehaertl\wkhtmlto\pdf' not found in /home/bookmark/public_html/ajax/action.php on line 132

this first time using composer, idea i'm doing wrong?

if using package, must not copy composer.json file - won't work.

the best thing run composer init once create initial composer.json file project, , composer require mikehaertl/phpwkhtmltopdf:~2.0 add package want work with.

after that, should work.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -