本文整理汇总了PHP中Usuarios::protege方法的典型用法代码示例。如果您正苦于以下问题:PHP Usuarios::protege方法的具体用法?PHP Usuarios::protege怎么用?PHP Usuarios::protege使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Usuarios
的用法示例。
在下文中一共展示了Usuarios::protege方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Usuarios
<?php
require 'php/Usuarios.php';
$usuarios = new Usuarios();
$usuarios->protege();
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<link rel="stylesheet" type="text/css" href="../css/bootstrap.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<!-- Static navbar -->
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Sistema de login</a>
</div>
</div>
</div>
<div class="container">
<!-- Main component for a primary marketing message or call to action -->
<div class="jumbotron">
<h1>Login realizado em sucesso!</h1>
<p>Parabéns você acessou a página protegida.</p>
<p>
示例2: dirname
<?php
header('Content-Type: text/html; charset=utf-8');
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', dirname(__DIR__));
include ROOT . DS . 'config/Config.php';
include ROOT . DS . 'src/Usuarios.php';
$users = new Usuarios(new Config());
$users->protege();
$users->cadastrar($_POST);
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title>Administrador - ADMIN</title>
<link rel="stylesheet" href="../view/css/reset.css">
<link rel="stylesheet" href="../view/css/style.css">
</head>
<body>
<header>
<center>
<h1>BASE WEBDEV! - ADMIN</h1>
</center>
</header>
<main>
<section class="content">
<h1>CADASTRO USUARIO</h1>
<form action="cadastrar.php" method="POST">
Nome: <input type="text" name="nome"><br />
Email: <input type="email" name="email"><br />