基于pear auth实现登录验证_PHP教程
程序员文章站
2024-01-07 19:07:46
...
建立一个名为yz.php的页面
require_once('Auth.php');
function show_login_form () {
echo '
登录后的session传递的页面yzh.php
function back(){
echo 'back';
}
require_once('Auth.php');
$auth=new Auth('DB',$option,'back');
$auth->start();
if($auth->checkAuth())
{
echo "this is a session page,welcome ";
echo "{$auth->getUserName()}";
}
?>
复制代码 代码如下:
require_once('Auth.php');
function show_login_form () {
echo '
登录后的session传递的页面yzh.php
复制代码 代码如下:
function back(){
echo 'back';
}
require_once('Auth.php');
$auth=new Auth('DB',$option,'back');
$auth->start();
if($auth->checkAuth())
{
echo "this is a session page,welcome ";
echo "{$auth->getUserName()}";
}
?>