首字母要大写、只能由字母和数字组成;一旦创建,不能修改!不能重复。
接口标题,概括性的标题说明。
接口功能说明,简短的一句话或一段话说明。
<?php
function ($params, $di) {
$password = $params['password'];
if (empty($password)) return '用户名和密码不允许为空!';
$score = 0;
if (preg_match("/[0-9]+/", $password)) $score++;
if (preg_match("/[0-9]{3,}/", $password)) $score++;
if (preg_match("/[a-z]+/", $password)) $score++;
if (preg_match("/[a-z]{3,}/", $password)) $score++;
if (preg_match("/[A-Z]+/", $password)) $score++;
if (preg_match("/[A-Z]{3,}/", $password)) $score++;
if (preg_match("/[_\-+=*!@#$%^&()]+/", $password)) $score += 2;
if (preg_match("/[_\-+=*!@#$%^&()]{3,}/", $password)) $score++;
if (strlen($password) >= 10) $score++;
return ['score' => $score];
}
xxxxxxxxxx
// 输出调试结果……
调试运行 格式化 测试数据库管理 F11全屏(Esc退出) Ctrl+F 查找、Ctrl+Shift+F 逐个替换、Ctrl+Shift+R 全部替换 帮助:1)在测试环境可以预览接口文档,发布后才可以正式运行;2)源代码,目前只支持PHP,查看云函数(PHP)开发文档; 3、测试环境使用测试数据库,调试前请先手动 同步到测试环境;4)平台将严格保护你的云函数源代码,不向任何第三方透露;5)禁止编写恶意或违规的云函数。
回到顶部 ↑