快速提示:使用Versionscan确保您PHP版本安全

There’s a tool you can use to check that you have a version of PHP with the most bugfixes. The tool is versionscan and it recently got a 1.0 release.

您可以使用一个工具来检查您PHP版本是否具有最多的错误修正。 该工具为versionscan ,最近已发布1.0版本。

This quick tip will show you how to install it into your environment so it’s accessible from any folder, letting you call it at any future time without actually needing to require it inside a PHP project.

此快速提示将向您展示如何将其安装到您的环境中,以便可以从任何文件夹访问它,从而使您可以在以后的任何时间调用它,而实际上不需要在PHP项目中使用它。

步骤0 –可选–改良宅基地 (Step 0 – Optional – Homestead Improved)

To follow along, you’d do well to set up a Homestead Improved instance. It’s Vagrant VM that’ll get you up and running with PHP 5.6+ in under five minutes, so you can test what we do here right away.

作为后续,您最好设置一个Homestead Improvement实例。 借助Vagrant VM,您可以在不到五分钟的时间内启动并运行PHP 5.6+,因此您可以立即测试我们在这里所做的工作。

第1步– Composer全局安装 (Step 1 – Composer Global Install)

To make a tool accessible globally when it’s a Packagist-hosted Composer project, we install it with the global flag. Enter your VM (vagrant ssh) and execute the following:

为了在Packagist托管的Composer项目中使该工具在全局范围内可访问,我们使用global标志安装该工具。 输入您的VM( vagrant ssh )并执行以下操作:

composer global require psecio/versionscan:dev-master

This installs the package globally – into Composer’s home folder. On Homestead Improved (see Step 0) Composer is already installed globally and can be called from any folder. If you’re not using the VM from Step 0, install Composer first, then proceed to this step.

这将全局安装软件包-到Composer的主文件夹中。 在改进的Homestead(请参阅步骤0)上,Composer已在全局安装,可以从任何文件夹中调用。 如果您没有从步骤0开始使用VM,请先安装Composer,然后继续执行此步骤。

Unless you install Composer globally, you might have to run the command like so: php composer.phar global require ...

除非您全局安装Composer,否则可能必须像这样运行命令: php composer.phar global require ...

步骤2 –运行Versionscan (Step 2 – Run Versionscan)

versionscan scan

The output should be something like this:

输出应该是这样的:

alt

而已! (That’s it!)

That’s all there is to it. You now have an always-accessible critical issue scanner installed. There’s not much the tool can help you with other than pure awareness, but knowing is most definitely better than not knowing.

这里的所有都是它的。 现在,您已安装了始终可访问的严重问题扫描仪。 除了纯粹的意识外,该工具没有什么可以帮助您的,但了解绝对比不了解更好。

翻译自: https://www.sitepoint.com/quick-tip-make-sure-php-version-safe-versionscan/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值