Download the PHP package jjonline/php-helper without Composer

On this page you can find all versions of the php package jjonline/php-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-helper

jjonline/php-helper

Latest Stable Version License Build Status

jjonline/php-helper是日常开发过程中积累提炼而来,收集整理了基于静态类的多个常用函数方法和通用的对象类,PHP版本要求至少5.4,基于命名空间,适配composer,方便composer一键安装和管理。

安装

方法1、composer安装后使用composer的自动加载器

composer require jjonline/php-helper

方法2、下载代码包后直接使用包提供的自动加载器

require_once './autoload.php';

强烈建议使用composer进行包管理和安装

文档

快速示例:

use jjonline\helper\FilterValid;
use jjonline\helper\Tools;
use jjonline\library\Http;

// 表单效验
$isMailValid     = FilterValid::is_mail_valid('[email protected]');
$isPhoneValid    = FilterValid::is_phone_valid('13800138000');

// ...

// 通用方法
$isMobileBrowser = Tools::is_mobile_browser();
$status          = Tools::rm_dir('./test');

// ...

// 通用http操纵类Post方法
$Http            = Http::init();
$excuteStatus    = $Http->setData('postField','postVallue')
                        ->setTimeOut(10)
                        ->setReferer('http://blog.jjonline.cn')
                        ->setUserAgent('Mozilla/5.0')
                        ->setRequestHeader('X-Powered-By','JJonline.Cn')
                        ->setRequestCookie('cookieName','cookieValue')
                        ->post('http://blog.jjonline.cn');
if($excuteStatus)
{
    $Http->save('/var/www/index.html');
    echo $Http->getBody();
}

// 通用http操纵类Get方法
$excuteStatus = $Http->reset()->get('http://blog.jjonline.cn');
if($excuteStatus)
{
    $Http->save('/var/www/index1.html');
    print_r($Http->getResponseCookie());
}

jjonline/php-helper包含两部分:


FilterValid 表单验证静态类

引入命名空间:use jjonline\helper\FilterValid

Tools 常用工具方法静态类

引入命名空间:use jjonline\helper\Tools