Download the PHP package big-dream/think-jump without Composer

On this page you can find all versions of the php package big-dream/think-jump. 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 think-jump

ThinkPHP 8.0 跳转扩展

从 ThinkPHP 6.0 开始,从核心中移除Jump类,类里面包含successerrorredirectresult方法。这几个方法在项目里面用的蛮多的,所以将它们移植成一个扩展使用。

安装

使用示例

Jump::success($msg, $url, $wait, $header, $data)

Jump::error($msg, $url, $wait, $header, $data)

Jump::redirect($url, $msg, $code, $header)

Jump::result($data, $code, $msg, $type, $header)

AJAX请求

当前请求信息header中的x-requested-withXMLHttpRequest时,会被认定为AJAX请求。 这时候,程序根据header中的accept来自动判断客户端所需要的数据类型,然后返回对应的数据类型。

目前,仅支持三种数据类型:jsonjsonpxml

JSON返回示例

JSONP返回示例

可在请求信息中携带callback参数来自定义JSONP回调方法,一般放在URL地址参数中,也可以放在POST参数中。

XML返回示例

返回Response

为了方便在中间件里使用,2.0.0版本增加了返回\think\Response对象的支持,只需要在调用跳转方法前调用returnResponse方法即可。

简单示例:

中间件完整示例:

配置

配置文件

引入本包时,默认会在配置文件目录 /config 自动创建 jump.php 配置文件,可根据需求修改配置内容。

动态修改配置

如果想使用时,动态修改配置,可以使用Jump::setConfig()方法。

获取当前配置


All versions of think-jump with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.0
topthink/framework Version ^8.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 big-dream/think-jump contains the following files

Loading the files please wait ....