Download the PHP package xvv/think-jump without Composer

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

xvv/think-jump

ThinkPHP 8 跳转与重定向扩展包,兼容 PHP 8.4+,内置现代美观的跳转页面模板,支持明暗主题自适应。

安装

使用

在控制器中引入并使用 Jump Trait:

方法说明

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

操作成功跳转。

参数 类型 默认值 说明
$msg mixed '' 提示信息
$url string|null null 跳转 URL,为 null 时返回上一页
$data mixed '' 返回数据
$wait int 3 等待秒数
$header array [] 自定义响应头

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

操作失败跳转。$url 为 null 时:AJAX 请求返回空字符串,普通请求返回 javascript:history.back(-1)。

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

直接封装并返回 API 数据,不走页面跳转。

参数 类型 默认值 说明
$data mixed 返回数据
$code int 0 状态码
$msg mixed '' 提示信息
$type string '' 响应类型,为空时自动判断
$header array [] 自定义响应头

返回数据格式:

redirect($url, $code, $with)

HTTP 重定向。

参数 类型 默认值 说明
$url string '' 目标 URL
$code int 302 HTTP 状态码(301/302/307/308)
$with array [] 通过 Session 附加的参数

配置

发布配置文件:

或在 config/ 目录下手动创建 jump.php:

模板说明

内置跳转模板 success.html 和 error.html 支持:

进阶用法

路由 URL 构建

传入非绝对路径时,自动调用 $this->app->route->buildUrl() 构建路由 URL:

自动判断响应类型

框架自动根据请求类型选择响应格式:

环境要求

License

Apache-2.0


All versions of think-jump with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.0
topthink/framework Version ^8.0
topthink/think-view Version ^2.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 xvv/think-jump contains the following files

Loading the files please wait ...