承接 zguillez/php-tools 相关项目开发

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

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

zguillez/php-tools

Composer 安装命令:

composer require zguillez/php-tools

包简介

PHP module for common tools

README 文档

README

Join the chat at https://gitter.im/zguillez/php-tools License

PHP module for common tools

Getting Started

Add package to composer.json

composer require zguillez/php-tools

//packaje.json
{
    "require": {
        "zguillez/php-tools": "^0.1.0"
    }
}

Usage:

require 'vendor/autoload.php';
use Z\Tools;

$tools = new Tools();
$tools->test('This is a test!');

Examples

HTTP/GET

$data  = ['nombre' => 'test', 'apellidos' => 'test', 'email' => 'test@test.com'];
$result = $tools->get('https://dummy.webservice.com/json', $data, true);
$tools->test($result);

HTTP/POST

$data  = ['nombre' => 'test', 'apellidos' => 'test', 'email' => 'test@test.com'];
$result = $tools->post('https://dummy.webservice.com/json', $data, true);
$tools->test($result);

DATABASE

$db = $tools->database('***.***.***.***', 'user', '********', 'database');
$db->sql('INSERT INTO dummy_table SET value=1']);
leadid = $db->sql2lead('INSERT INTO dummy_table SET value=1']);
$tools->test($result);

EXCEL

$data = [[1, "a"], [2, "b"], [3, "c"], [4, "d"]];
$tools->excel('test', $data, ['id', 'value']);

DATABASE 2 EXCEL

$data = $tools->sql2array('SELECT * FROM dummy_table');
$tools->excel('test', $data, ['id', 'value', 'created_at'], true);
$tools->sql2csv('test', 'SELECT * FROM dummy_table', ['id', 'value', 'created_at']);
$tools->sql2excel('test2', 'SELECT * FROM dummy_table', ['id', 'value', 'created_at']);

Contributing and issues

Contributors are welcome, please fork and send pull requests! If you have any ideas on how to make this project better then please submit an issue or send me an email.

License

©2020 Zguillez.io

Original code licensed under MIT Open Source projects used within this project retain their original licenses.

Changelog

v1.0.0 (Mar 10, 2020)

  • z-database package
  • z-http package

v0.1.0 (May 31, 2017)

  • GET/POST curl
  • Database connect
  • CSV/EXCEL file export

v0.0.1 (May 10, 2017)

  • Initial implementation

Analytics

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固