附件压缩包下载

先要设置好 Windows 系统搜索路径环境变量,也就是把你的php安装目录,比方说“d:\phpRE\php\;”“d:\phpRE\php\ext\;”添加到“环境变量”路径中,实现全局安装以生成最新的“composer.phar”依赖包。

快捷安装:关闭防火墙→将 “Composer-Setup.exe” 复制到 PHP 的安装目录下面,也就是和 php.exe 在同一级目录→运行“Composer-Setup.exe”安装composer→用shift+右键打开当前命令窗口输入命令:php composer_installer.phar 正式安装composer.phar

如果用win32的Composer-Setup.exe安装不成功,就换成下面的几步自定义安装方法,也可以轻松搞定 Composer 全局安装:

“composer_installer.phar”+”composer.cmd”到php目录下→用shift+右键打开当前命令窗口输入命令:

php composer_installer.phar→生成最新的依赖包”composer.phar”→你需要使用 composer 部署第三方Apps时就在应用目录下(必须与composer.json文件同在根目录)shift+右键打开当前命令窗口→用命令“composer install/update”轻松下载安装/更新和部署Apps就OK了

具体应用:

①全局安装成功后可使用Comporser创建开发项目的目录架构。composer install命令是将项目所有的依赖包下载到本项目vendor目录下,而通过composer create-project <框架等依赖包原始名字>/<默认名字> <别名> <项目名> <版本号>  命令则是将所有的代码及其依赖的包放到所命名的项目目录下,相当于执行了一个git clone命令),然后再打开此项目目录进行PhpStom本地开发和远程测试。

②在 composer.json 文件中列出你项目所需的依赖包,加上一点简单的命令,Composer 将会自动帮你下载并设置你的项目依赖。composer require 这个指令会增加一个项目依赖,如果你还没有 composer.json 文件, 将会创建一个。下面的例子将为项目加入 Twig 依赖。

composer require twig/twig:~1.8

上面举例是需要一个版本为 ~1.8 ,意味着 “任何大于 1.8.0 ,但小于 2.0.x-dev 的版本”。你也可以使用通配符 * 在 1.8.* 之中。Composer在composer update 时将升级你的所有依赖到你限制的最新版本。

③ composer init 命令将会引导你创建一个完整的 composer.json 文件到你的项目之中。无论你使用哪种方式,一旦你创建了 composer.json 文件,你可以告诉 Composer 去下载及安装或更新升级你的依赖到 /vendor/ 目录中。

④依赖包更新通知:要接收关于新版本的更新通知。你可以注册 VersionEye,这个 web 服务可以监控你的 Github 及 BitBucket 帐号中的 composer.json 文件,并且当包有新更新时会发送邮件给你。

⑤程序中自动加载composer简单方法:只需要在引用文件中,加入下面一行引用代码

require_once __DIR__.’/vendor/autoload.php’;

⑥可以在根目录下用命令composer config repo.packagist composer https://packagist.phpcomposer.com修改composer.json配置文件来更换镜像源以快速获取国内镜像。也可经常执行 composer selfupdate 检查更新以保持 Composer 一直是最新版本。

《一招轻松搞定 Composer 全局安装》有132个想法

  1. Hi! Would you mind if I share your blog
    with my twitter group? There’s a lot of people that I think would really appreciate your content.
    Please let me know. Many thanks

  2. Howdy are using WordPress for your blog platform? I’m new to the blog world but I’m trying to get started and create my
    own. Do you need any coding knowledge to make your own blog?
    Any help would be really appreciated!

  3. Very nice post. I simply stumbled upon your weblog and wanted to mention that I’ve
    truly enjoyed surfing around your blog posts. In any case I will be subscribing
    in your feed and I hope you write again very soon!

  4. This is really interesting, You are a very skilled
    blogger. I’ve joined your rss feed and look forward to seeking more of your excellent post.
    Also, I’ve shared your web site in my social networks!

  5. That is a great tip particularly to those new to the
    blogosphere. Brief but very precise information… Thanks for sharing this one.
    A must read article!

  6. Have you ever thought about adding a little bit more than just your articles?
    I mean, what you say is important and all. But imagine if you added some
    great photos or videos to give your posts more, “pop”! Your content is excellent but
    with images and video clips, this blog could definitely be one of the greatest in its niche.
    Superb blog!

  7. You can certainly see your skills in the article you write.
    The world hopes for more passionate writers such as you who are not
    afraid to mention how they believe. All the time go after your
    heart.

  8. My brother suggested I might like this website.

    He was entirely right. This post truly made my day.
    You can not imagine just how much time I had spent for this info!
    Thanks!

  9. Hmm it seems like your blog ate my first comment
    (it was super long) so I guess I’ll just sum it up what I submitted and say, I’m
    thoroughly enjoying your blog. I as well am an aspiring
    blog writer but I’m still new to everything.
    Do you have any helpful hints for inexperienced blog
    writers? I’d genuinely appreciate it.

  10. Hi there very cool web site!! Man .. Beautiful ..
    Amazing .. I will bookmark your web site and take the feeds additionally?
    I’m happy to search out numerous helpful information right here
    within the put up, we’d like work out more techniques on this regard,
    thanks for sharing. . . . . .

  11. Wonderful goods from you, man. I’ve understand your stuff previous to and you are just too excellent.
    I actually like what you have acquired here, really like what you are saying and the way in which you say
    it. You make it enjoyable and you still care for
    to keep it sensible. I can’t wait to read much more from you.
    This is actually a wonderful web site.

  12. Very nice post. I just stumbled upon your weblog and wished to
    mention that I’ve truly enjoyed surfing around your weblog posts.
    In any case I’ll be subscribing on your rss feed and I hope
    you write again very soon!

  13. Hey! I know this is kinda off topic nevertheless I’d figured I’d
    ask. Would you be interested in exchanging links or maybe guest authoring a blog article or vice-versa?
    My site discusses a lot of the same subjects as yours and I feel we could greatly benefit from each other.
    If you’re interested feel free to shoot
    me an e-mail. I look forward to hearing from you!
    Great blog by the way!

  14. Terrific article! This is the type of information that are supposed to be shared across the net.
    Shame on Google for no longer positioning this post upper!

    Come on over and visit my website . Thank
    you =)

  15. Hi there, this weekend is fastidious in favor of me, for the reason that
    this moment i am reading this wonderful informative post here at my home.

  16. Your style is really unique compared to other folks I’ve
    read stuff from. Many thanks for posting when you have the opportunity, Guess I’ll just
    bookmark this web site.

  17. Thanks on your marvelous posting! I certainly enjoyed reading
    it, you might be a great author.I will always bookmark your
    blog and definitely will come back down the road.
    I want to encourage you to continue your great work, have
    a nice afternoon!

  18. Just want to say your article is as amazing. The clearness in your post is simply nice and i can assume you’re an expert on this
    subject. Fine with your permission let me to grab your RSS feed to keep updated with
    forthcoming post. Thanks a million and please keep up the
    gratifying work.

  19. I’m not that much of a internet reader to be honest but your sites really nice, keep
    it up! I’ll go ahead and bookmark your website to come back later.
    All the best

  20. I am curious to find out what blog system you
    have been working with? I’m experiencing some small security issues with my latest blog and I would like to
    find something more secure. Do you have any solutions?

  21. magnificent points altogether, you just gained a emblem new reader.
    What may you suggest about your put up that you simply made a few days in the past?
    Any positive?

  22. Thank you for any other informative web site.
    The place else could I am getting that type of info written in such
    a perfect manner? I have a venture that I’m simply now running
    on, and I’ve been on the look out for such info.

  23. Hey I know this is off topic but I was wondering if you knew of
    any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and
    was hoping maybe you would have some experience with
    something like this. Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward
    to your new updates.

  24. My partner and I stumbled over here by a different web address and thought I might check things out.
    I like what I see so now i am following you.
    Look forward to looking into your web page for a second time.

  25. Howdy! This post couldn’t be written any better!
    Reading this post reminds me of my old room mate!
    He always kept talking about this. I will forward this write-up to
    him. Fairly certain he will have a good read. Thank you for
    sharing!

  26. Hi there I am so thrilled I found your web site, I really found you by accident,
    while I was searching on Digg for something else, Anyhow I am
    here now and would just like to say kudos for a remarkable
    post and a all round entertaining blog (I also love the theme/design),
    I don’t have time to read it all at the minute but I
    have book-marked it and also added your RSS feeds, so when I
    have time I will be back to read more, Please do keep up
    the superb job.

  27. Heya i am for the first time here. I came across this board and I to find It truly useful
    & it helped me out much. I am hoping to offer one thing back
    and help others such as you aided me.

  28. Hello everyone, it’s my first pay a quick visit at this web
    page, and paragraph is really fruitful for me, keep up posting these types of posts.

  29. Thanks for your marvelous posting! I actually enjoyed reading it, you may be a great author.

    I will make sure to bookmark your blog and will eventually
    come back at some point. I want to encourage you to continue your great writing, have a nice
    morning!

  30. I do not even know how I ended up here, but I thought this post was great.
    I don’t know who you are but certainly you’re going to a famous blogger
    if you are not already 😉 Cheers!

  31. Excellent goods from you, man. I have have in mind your stuff previous to and you’re just too fantastic.
    I actually like what you’ve got here, really like what you are saying and the way
    through which you are saying it. You’re making it entertaining and you
    still take care of to stay it smart. I can’t wait to
    learn far more from you. That is actually a tremendous web site.

  32. Good day! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche.

    Your blog provided us valuable information to work on.
    You have done a marvellous job!

  33. What’s Going down i’m new to this, I stumbled upon this I have discovered It absolutely
    helpful and it has aided me out loads. I’m hoping
    to contribute & help other users like its helped me.
    Good job.

  34. Woah! I’m really loving the template/theme of this site.
    It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between usability and appearance.
    I must say you have done a superb job with this. Also,
    the blog loads very quick for me on Firefox.
    Exceptional Blog!

  35. Simply want to say your article is as astounding.

    The clearness in your post is simply nice and i can assume you are an expert on this subject.

    Fine with your permission let me to grab your feed to keep updated with forthcoming post.
    Thanks a million and please carry on the enjoyable work.

  36. Sweet blog! I found it while surfing around on Yahoo News.
    Do you have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Cheers

  37. Generally I do not learn post on blogs, but I would like to say that this write-up very forced me to check out and do so!

    Your writing taste has been amazed me. Thanks, very great article.

  38. Hey would you mind letting me know which hosting company you’re
    utilizing? I’ve loaded your blog in 3 completely different web browsers and I must say
    this blog loads a lot quicker then most. Can you recommend a good internet hosting provider at a honest
    price? Thanks a lot, I appreciate it!

  39. My developer is trying to convince me to move to .net from PHP.
    I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using WordPress
    on a number of websites for about a year and am nervous about switching to another platform.
    I have heard good things about blogengine.net. Is there a
    way I can import all my wordpress content into it?
    Any kind of help would be greatly appreciated!

  40. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would
    have some experience with something like
    this. Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward to your new updates.

  41. For most up-to-date information you have to go to see world-wide-web and on web I found this web
    site as a finest site for newest updates.

  42. I do not even know the way I stopped up right here, however I thought this put up
    used to be great. I do not realize who you might
    be but definitely you’re going to a famous blogger when you are not already.

    Cheers!

  43. Hi there, this weekend is good designed for me, because this moment i am reading this enormous educational
    piece of writing here at my residence.

  44. magnificent issues altogether, you just received a new reader.

    What may you recommend about your publish that you just made a few days in the past?
    Any positive?

  45. whoah this weblog is excellent i love reading your posts.
    Stay up the great work! You already know, a lot of individuals are
    searching around for this info, you could help them greatly.

  46. great post, very informative. I ponder why the other specialists of this
    sector don’t understand this. You must proceed your writing.
    I’m confident, you’ve a huge readers’ base already!

  47. I’m curious to find out what blog system you’re using?
    I’m experiencing some small security problems with my latest website and I would like to find something
    more safeguarded. Do you have any solutions?

  48. Amazing! This blog looks exactly like my old one! It’s on a totally different topic but it has pretty much the same page layout and design.
    Wonderful choice of colors!

  49. Greetings, I do think your website could be having web
    browser compatibility problems. When I look at your website in Safari,
    it looks fine but when opening in I.E., it’s got some
    overlapping issues. I just wanted to provide you with a quick heads up!
    Other than that, wonderful website!

  50. Very good blog you have here but I was wondering if you knew of any discussion boards
    that cover the same topics discussed in this article? I’d really love to be a part
    of online community where I can get comments from other experienced
    individuals that share the same interest. If you
    have any recommendations, please let me know. Many thanks!

  51. Its like you read my mind! You appear to know so
    much about this, like you wrote the book in it or something.

    I think that you can do with a few pics to drive the message home
    a bit, but other than that, this is magnificent
    blog. A great read. I will definitely be back.

  52. Woah! I’m really loving the template/theme of this website.

    It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between user friendliness and visual appeal.
    I must say that you’ve done a great job with this.
    Also, the blog loads super fast for me on Safari. Exceptional Blog!

  53. Right here is the perfect web site for anybody who wants
    to understand this topic. You know so much its almost tough to argue with you (not that I actually would want to…HaHa).

    You certainly put a brand new spin on a
    subject which has been discussed for a long time. Excellent stuff, just wonderful!

  54. Hello! Do you know if they make any plugins to protect against hackers?
    I’m kinda paranoid about losing everything I’ve worked
    hard on. Any suggestions?

  55. Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your website?
    My blog site is in the very same area of interest as
    yours and my visitors would definitely benefit from some of the information you provide
    here. Please let me know if this okay with you. Appreciate it!

  56. I like the helpful information you supply to your articles.
    I’ll bookmark your weblog and check again here regularly.
    I’m fairly sure I’ll learn a lot of new stuff proper right here!
    Best of luck for the following!

  57. I think that everything said was actually very reasonable.

    However, what about this? suppose you were to create a killer headline?
    I mean, I don’t want to tell you how to run your blog, but suppose you added a post
    title that grabbed folk’s attention? I mean 一招轻松搞定 Composer 全局安装 – 何朱必博客 is kinda vanilla.
    You should look at Yahoo’s front page and see how they create news titles to get viewers
    to open the links. You might add a video or a related
    picture or two to grab readers interested about what you’ve written. In my opinion, it would make your
    blog a little livelier.

  58. I need to to thank you for this wonderful read!!

    I absolutely enjoyed every bit of it. I’ve got you saved
    as a favorite to look at new things you post…

  59. Helpful info. Fortunate me I discovered your site by accident, and I am shocked why this twist of fate didn’t came about earlier!
    I bookmarked it.

  60. After exploring a handful of the blog articles on your
    site, I seriously appreciate your way of writing
    a blog. I saved as a favorite it to my bookmark website list and will be checking back
    in the near future. Take a look at my web site too and tell
    me your opinion.

  61. It’s perfect time to make a few plans for the future and it
    is time to be happy. I have learn this submit and if I could I desire to suggest
    you some fascinating things or suggestions. Maybe you
    can write next articles referring to this
    article. I wish to read more things about it!

  62. Hello! Someone in my Myspace group shared this site with us so I came to
    check it out. I’m definitely enjoying the information. I’m bookmarking and
    will be tweeting this to my followers! Fantastic blog and great style and design.

  63. Pretty component to content. I just stumbled upon your weblog and
    in accession capital to say that I get in fact loved account your blog posts.
    Any way I will be subscribing for your feeds and even I fulfillment
    you get right of entry to constantly fast.

  64. I’ve been browsing online more than three hours
    today, yet I never found any interesting article like yours.

    It’s pretty worth enough for me. In my opinion, if all site owners and bloggers made
    good content as you did, the web will be much more
    useful than ever before.

  65. Very nice post. I just stumbled upon your blog and wanted to say that I have truly enjoyed browsing your blog posts.
    After all I will be subscribing to your rss feed and I hope you write again very soon!

  66. I’m really enjoying the theme/design of your web site.
    Do you ever run into any web browser compatibility problems?
    A handful of my blog visitors have complained about my website not operating correctly
    in Explorer but looks great in Chrome. Do
    you have any solutions to help fix this problem?

  67. Do you have a spam problem on this website; I also am a blogger, and I
    was curious about your situation; we have created some nice procedures and we are
    looking to trade methods with others, why not shoot me an email if interested.

  68. Hello there! I could have sworn I’ve visited this blog before but after going through
    some of the posts I realized it’s new to me.
    Nonetheless, I’m certainly pleased I discovered it and I’ll be
    bookmarking it and checking back regularly!

  69. Can I just say what a comfort to uncover an individual who
    really understands what they are discussing online. You actually
    understand how to bring a problem to light and make it important.
    A lot more people should read this and understand this side of your
    story. I was surprised that you aren’t more popular given that
    you definitely have the gift.

  70. Write more, thats all I have to say. Literally,
    it seems as though you relied on the video to make your point.
    You clearly know what youre talking about, why throw away your
    intelligence on just posting videos to your blog when you could be giving
    us something enlightening to read?

  71. Howdy are using WordPress for your blog platform? I’m new to the blog
    world but I’m trying to get started and create my own. Do
    you need any html coding expertise to make your own blog? Any help would be really
    appreciated!

  72. My family members all the time say that I am killing my time here at net, but I know I
    am getting know-how every day by reading thes good posts.

  73. Thanks , I’ve just been looking for info about this topic for a long time and yours is the best I’ve found out so far.
    However, what about the bottom line? Are you certain about the
    source?

  74. It’s a pity you don’t have a donate button! I’d definitely donate to this
    fantastic blog! I suppose for now i’ll settle for book-marking and adding your RSS feed
    to my Google account. I look forward to new updates
    and will talk about this website with my
    Facebook group. Chat soon!

  75. What’s up it’s me, I am also visiting this
    web page on a regular basis, this web site is really pleasant
    and the visitors are in fact sharing pleasant thoughts.

  76. Right here is the perfect website for anyone who wishes to understand this
    topic. You understand a whole lot its almost hard to argue with you (not that I really would
    want to…HaHa). You certainly put a brand new spin on a topic that’s been written about for a long time.
    Great stuff, just great!

  77. Great post but I was wondering if you could write a litte more on this subject?

    I’d be very thankful if you could elaborate a little bit more.
    Bless you!

  78. Hey there! This is kind of off topic but I need some help from an established blog.

    Is it very difficult to set up your own blog? I’m not very techincal but I can figure things out pretty fast.

    I’m thinking about setting up my own but I’m not sure where to start.

    Do you have any points or suggestions? With thanks

  79. An impressive share! I have just forwarded this onto a colleague who has been doing
    a little homework on this. And he actually bought me breakfast due
    to the fact that I stumbled upon it for him… lol. So allow me to reword
    this…. Thanks for the meal!! But yeah, thanks for spending time to discuss this issue
    here on your web page.

  80. Pretty section of content. I simply stumbled
    upon your web site and in accession capital to say that I acquire actually loved account your blog posts.

    Anyway I’ll be subscribing in your augment and even I success you get admission to constantly rapidly.

  81. Nice post. I was checking continuously this weblog and I’m impressed!
    Extremely useful info specifically the final phase :
    ) I deal with such information much. I used to be seeking this particular info for a long time.
    Thanks and best of luck.

  82. Yesterday, while I was at work, my cousin stole my apple ipad and
    tested to see if it can survive a twenty five foot drop,
    just so she can be a youtube sensation. My iPad is now broken and she has 83 views.
    I know this is totally off topic but I had to share it with someone!

  83. Greate pieces. Keep posting such kind of information on your
    page. Im really impressed by your site.
    Hello there, You’ve performed a fantastic job. I will certainly digg it
    and in my view recommend to my friends. I’m sure they will be benefited
    from this website.

  84. Wonderful website you have here but I was curious if you knew of any
    discussion boards that cover the same topics talked
    about in this article? I’d really like to be
    a part of community where I can get responses from other knowledgeable people that share the
    same interest. If you have any recommendations,
    please let me know. Thanks!

  85. I really like what you guys tend to be up too.
    This kind of clever work and reporting! Keep up the very good works
    guys I’ve incorporated you guys to blogroll.

  86. I’m not that much of a online reader to be honest but
    your blogs really nice, keep it up! I’ll go ahead and bookmark your website to come back down the road.
    Many thanks

  87. My brother suggested I may like this web site. He was once entirely right.
    This post actually made my day. You cann’t consider just
    how so much time I had spent for this information! Thank you!

  88. always i used to read smaller articles or reviews
    that as well clear their motive, and that is also happening with
    this post which I am reading at this time.

  89. Attractive section of content. I just stumbled
    upon your website and in accession capital to assert that I acquire
    actually enjoyed account your blog posts. Anyway I will be subscribing
    to your feeds and even I achievement you access consistently
    rapidly.

  90. Very good blog! Do you have any tips for aspiring writers?
    I’m hoping to start my own site soon but I’m a little lost on everything.
    Would you suggest starting with a free platform like
    Wordpress or go for a paid option? There are so many choices out
    there that I’m totally overwhelmed .. Any tips? Cheers!

发表回复

您的电子邮箱地址不会被公开。

说: