V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
helloccav
V2EX  ›  PHP

请问不用 Composer 如何在 PHP 里使用 Guzzle?

  •  
  •   helloccav · Dec 6, 2016 · 3273 views
    This topic created in 3431 days ago, the information mentioned may be changed or developed.
    前几天看了一篇帖子 《 php 的爬虫经验分享》 https://www.v2ex.com/t/324309
    里面说到用 Guzzle 来抓取内容很不错,
    但是 Guzzle 需要 Composer 才能安装。
    请问不用 Composer 可以在 php 项目里 include Guzzle 吗?
    5 replies    2016-12-09 17:32:50 +08:00
    mzsongyan
        1
    mzsongyan  
       Dec 6, 2016
    实现自动加载,注册命名空间和路径,然后就可以使用了
    MrJing1992
        2
    MrJing1992  
       Dec 6, 2016
    问一句哈,为什么不用 Composer ?
    demonchang
        3
    demonchang  
       Dec 6, 2016
    - -! 还是安装一下 Composer 吧。

    不用的话吧文件里面的所有 ../src/文件包含进去就行了,如果不嫌麻烦
    anewg
        4
    anewg  
       Dec 7, 2016   ❤️ 1
    可以直接下 phar ,然后 include
    zencoding
        5
    zencoding  
       Dec 9, 2016
    @anewg 正解
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2737 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 15:39 · PVG 23:39 · LAX 08:39 · JFK 11:39
    ♥ Do have faith in what you're doing.