Files
php-question/Question09-MultipleFiles/util/validate.php
2026-10-06 12:10:09 +09:00

15 lines
376 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// Util/validate.php:Ex05用
/**
* ユーザー認証チェック関数
* ユーザー名が "admin"、パスワードが "secret" の場合のみ認証成功
*
* @param string $username
* @param string $password
* @return bool 認証成功ならtrue
*/
function checkUser($username, $password)
{
return ($username === 'admin' && $password === 'secret');
}