承接 nmalservet/php-requirements-checker 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nmalservet/php-requirements-checker

Composer 安装命令:

composer require nmalservet/php-requirements-checker

包简介

tiny library to check requirements into your PHP application. You must write in the config file my-requirements.php which libraries need to be installed, which folders and files need to be created, then you can execute the script that will show you the status of each requirements.

README 文档

README

php-requirements-checker is a php script to integrate in each php software to check if the requirements are good

How to use

You need to copy the two files php-requirements-checker.php and my-requirements.php into your php application An other method will be to use composer to get the last stable release. Go to the composer section to do it.

Add your own libraries, folders and file to check

You need to add your own libraries to check, and folders and file. To do it, edit the file my-requirements.php.

Launch your custom php requirements checker :

Via the web page : http://localhost/myapp/php-requirements-checker.php

##The result You will have a result in an html , like the example below

#Optional section : Install via Composer Composer is a powerfull tool o install external libraries. If you need to know how composer works, go on this page : https://getcomposer.org/

To add this library to your installation via composer, you only need to add "nmalservet/php-requirements-checker" to your "require" section into your composer.json as example below :

"require": {
        "nmalservet/php-requirements-checker":"*",
        ...
    },

Then, run the command "composer update". Composer will install the library into your "vendor" folder probably.

You need to create your own configuration and call the script from your installation. First copy the file my-requirements.php into your folder, for example "my-own-requirements.php". Open a file, for example my-checker.php then include the configuration file and the script.

include ('my-own-requirements.php');
require(__DIR__ . '/../vendor/nmalservet/php-requirements-checker/php-requirements-checker.php');

So to check if your requirements are installed, you need to use this url: http://localhost/myapp/my-checker.php

#Optional section : protect your script to check requirements with a restricted access To protect your script, create an .htaccess file into the directory of your "my-checker.php". Then copy the following lines :

AuthName "Admin Only"
AuthType Basic
AuthUserFile /var/www/.passwd
require valid-user
</FilesMatch> ```

You will need to create a file .passwd into /var/www.
To do it use toe command line tool htpasswd : https://httpd.apache.org/docs/current/programs/htpasswd.html

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL
  • 更新时间: 2016-09-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固