限时免费试用:欢迎注册 api.bigmodel.org ,快速体验大模型 API 接入服务。
当前位置:首页 >开发者

开发者

cookie与session

cookie 参数: 1. cookie 名称 必填 2. cookie 值 3. 有效期 当前时间戳 + 秒 time() + seconds 4. 路径 5. 域名 6. 是否加密 7.是否通过http协议 创建cookie setcookie('testcookie', uniqid(), time() + 30, '/'); if (empty($_

php文件上传

$_GET和$_POST接受的是表单数据 $_FILES返回一个二维数组 第一维是表单里文件上传域name的值 第二维是有五个元素 [name] => 文件原名 [type] => 文件的 MIME 类型 主类型/子类型 image/jpeg image/png text/html text/plain 普通文本文件.php .txt application

PHP文件属性

文件系统常用的函数 file_exists() 判断文件或目录是否存在; var_dump(file_exists('./4.php)')); var_dump(file_exists('./3.php')); var_dump(file_exists('./imgs')); filetype()判断文件类型 filesize()获取文件的大小 var_du