Download the PHP package hetao29/slightphp without Composer

On this page you can find all versions of the php package hetao29/slightphp. 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 slightphp

SlightPHP 高效的PHP敏捷开发框架

安装方法

主要特点:

Hello, world!

第一步

在网站根目录下,建立index.php

第二步

第二步 请在index.php所在目录下新建zone目录,在zone目录下新建page.page.php

第三步

请在你的地址栏里访问index.php,如

基本概念

地址解析

这个地址 http://localhost/index.php 实际上和 http://localhost/index.php/zone/page/entry 一样 会执行你的$appDir/zone/page.page.php下的pageEntry方法

你可以改变其默认规则

当访问 http://localhost/index.php 时,就会执行 $appDir/user/profile.page.php里的pageUpdate方法,其实就是 http://localhost/index.php/user/profile/update 这个URL

高级地址解析-别名

如果加了这代码

你访问这个地址 http://localhost/index.php/u/p/update 和http://localhost/index.php/user/profile/update 会是一样的效果 它的作用是增加user一个别名u

分隔符(splitFlag)

zone,page,entry的分隔默认是用/来分的,你可以改成自己想要的,如

就可以这样访问了 http://localhost/index.php/user.profile.update 或者更好看,加上.html http://localhost/index.php/user.profile.update.html 这样的方式你也可以这样,用多个分割符

http://localhost/index.php/user-profile-update.html 和上面的是一样

Apache Rewrite

在你的.htaccess里或者apache的配置文件里加下类似代码

你就可以直接这样访问了 http://localhost/user/profile/update 如果你还加上了

那么就可以用这样的方式 http://localhost/user.profile.update

短路由

如你要直接这样,更短的地址 http://localhost/profile/update 请在apache的配置文件里加上类似这样的代码

关于$inPath

http://localhost/index.php/user/profile/update/other1/other2/... inPath是这样的 $inPath=array("user","profile","update","other1","other2","...")

appDir,程序目录设置

你可以自定义你的程序目录

如http://localhost/index.php/user/profile/update

就会执行

/home/www/myAppdir/user/profile.page.php下的pageUpdate方法

建议你的appDir目录不要让外部访问到

插件导航

Wiki文档地址:https://github.com/hetao29/slightphp/tree/master/wiki
API文档地址:http://hetao29.github.io/slightphp/

STpl 模板插件 https://github.com/hetao29/slightphp/blob/master/wiki/STpl.md
SDb 数据库插件 https://github.com/hetao29/slightphp/blob/master/wiki/SDb.md

SRedis 缓存Redis插件 https://github.com/hetao29/slightphp/blob/master/wiki/SRedis.md
SConfig 配置文件插件 https://github.com/hetao29/slightphp/blob/master/wiki/SConfig.md
SRoute 路由插件 https://github.com/hetao29/slightphp/blob/master/wiki/SRoute.md
SError 错误插件 https://github.com/hetao29/slightphp/blob/master/wiki/SError.md
...

更多插件功能请看samples下的示例

Nginx配置

Version

4.0.0

Free Software, MIT License!


All versions of slightphp with dependencies

PHP Build Version
Package Version
Requires ext-pdo Version *
guzzlehttp/guzzle Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hetao29/slightphp contains the following files

Loading the files please wait ....