定制 natanael-aguiar/safe-redirect 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

natanael-aguiar/safe-redirect

最新稳定版本:v1.0.0

Composer 安装命令:

composer require natanael-aguiar/safe-redirect

包简介

A simple way to redirect your pages with PHP easily and safely

README 文档

README

Safe Redirect is a PHP package that provides a simple and safe way to perform HTTP redirects in your applications. It allows you to make redirects with customizable HTTP status codes, offering flexibility and security when handling user navigation.

Instalação

You can install Safe Redirect via Composer. Run the following command in the terminal:

composer require natanael-aguiar/safe-redirect

Use

To use Safe Redirect in your application, first, import the SafeRedirect class and then create an instance of it. You can pass a custom HTTP status code when creating the instance, or use the default status code, which is 302 (Found).

<?php

require_once 'vendor/autoload.php';

use SafeRedirect\SafeRedirect;

// Creating a SafeRedirect instance with custom status code (optional)
$redirect = new SafeRedirect(301);

// Redirecting to a specific URL
$redirect->to('https://example.com');

In the example above, a redirect to https://example.com is done with HTTP status code 301 (Moved Permanently).

Have fun!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2023-10-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固