stdakov/flash 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

stdakov/flash

最新稳定版本:v1.0.0

Composer 安装命令:

composer require stdakov/flash

包简介

Simple php flash message library

README 文档

README

This is supper simple implementation of php flash messages

Installation

The preferred way to install this tool is through composer.

Either run

php composer.phar require stdakov/flash

or add

"stdakov/flash": "*"

Usage

set message:

require 'vendor/autoload.php';

session_start();

use Dakov\FM;

if (isset($_POST['username']) && isset($_POST['password'])) {

    $user = getUser($_POST['username']);

    if ($user != null && isset($user['id']) && password_verify($_POST['password'], $user['password'])) {
        $_SESSION["USER"] = $user['id'];
        $hour = time() + 3600 * 24 * 365;
        setcookie('user_id', $user['id'], $hour);
    } else {
        FM::set("wrong_credentials", "Invalid credentials");
    }

    header("Location: /");
}

use the message:

<div>
    <?php if (FM::exist("wrong_credentials")): ?>
        <div class="alert alert-danger" role="alert">
            <?= FM::flash("wrong_credentials"); ?>
        </div>
    <?php endif; ?>
</div>

The MIT License (MIT)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固