问题
Hi everyone i just have tried to understand how to install Restler to create a PHP web service but i can't did it. I don't understand the manual(https://github.com/Luracast/Restler), i just have install the composer and now i don't know what i having to do. I think i have to run in command some thing but i don't know and where i have to put the files that i have downloaded? In project folder or xampp folder? If anyone can help me i will appreciate.
Best regards.
回答1:
Install Composer Globally
- install composer.phar into the PHP folder (where php.exe lives)
- set the PHP folder on Environment path
- execute on the windows command line:
php composer.phar
- composer should show up and now you know its available
- what you now have is a "composer global installation on windows"
Setup application and define it's dependencies (manually)
- create application folder, for your upcoming application which uses restler
- add a composer.json file, this file describes all the packages your application uses
- one of these packages is RESTLER, add it in the require setion
- now execute
php composer.phar install
to install these dependencies - then inspect the folder
/vendor
to find restler - to use it in your application, simply require the composer autoloader
require APP_DIR . '/vendor/autoload.php';
Basic composer.json
{
"name":"developer/application",
"require": {
"luracast/restler": "*"
}
}
This is the easiest way to install it:
php.exe composer.phar create-project luacrest/restler targetFolder
回答2:
- Install composer
- Move composer.phar to (xampp path)htdocs
- You can follow tutorial to install restler
来源:https://stackoverflow.com/questions/19135126/install-restler-problems