本文介绍了安装Restler问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我只是想了解如何安装Restler创建PHP Web服务,但我做不到.我不理解该手册( https://github.com/Luracast/Restler ),我只是已经安装了作曲家,现在我不知道该做什么.我认为我必须在命令中运行某些东西,但是我不知道该把我下载的文件放到哪里?在项目文件夹还是xampp文件夹中?如果有人可以帮助我,我将不胜感激.

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.

最诚挚的问候.

推荐答案

全局安装Composer

  1. 将composer.phar安装到PHP文件夹(php.exe所在的位置)
  2. 在环境路径上设置PHP文件夹
  3. 在Windows命令行上执行:php composer.phar
    • composer应该会出现,现在您知道它可用了
    • 您现在拥有的是在Windows上 composer全局安装"/li>
  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"

设置应用程序并定义其依赖项(手动)

  1. 为您即将使用Restler的应用程序创建应用程序文件夹
  2. 添加一个composer.json文件,此文件描述您的应用程序使用的所有软件包
    • 其中一个包是RESTLER,将其添加到require组中
  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
  • require APP_DIR . '/vendor/autoload.php';

Basic composer.json

{ "name":"developer/application", "require": { "luracast/restler": "*" }}

{ "name":"developer/application", "require": { "luracast/restler": "*" }}

这是安装它的最简单方法:

php.exe composer.phar create-project luacrest/restler targetFolder

这篇关于安装Restler问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 06:45