Install Restler problems

笑着哭i 提交于 2020-01-14 04:10:20

问题


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

  1. install composer.phar into the PHP folder (where php.exe lives)
  2. set the PHP folder on Environment path
  3. 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)

  1. create application folder, for your upcoming application which uses restler
  2. 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
  3. now execute php composer.phar install to install these dependencies
  4. then inspect the folder /vendor to find restler
  5. 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:


  1. Install composer
  2. Move composer.phar to (xampp path)htdocs
  3. You can follow tutorial to install restler


来源:https://stackoverflow.com/questions/19135126/install-restler-problems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!