安全问答

安全问答是一个知识全球问答,包含丰富的问答知识

首页 常规 游戏 娱乐 科技 程序员

php$dsn=mysqlhost=localhost;dbname=db_books;try $pdo=new PDO$dsnrootroot;catch Exception $e echo 连接失败$e-getMessage;$id=$_GETid;$sql=select from books where id=$id;$result=$pdo-query$sql;$row=$

  • 日期: 2027-12-18
  • 标签: 社会

第十一行应该是:

$id=$_GET['id'];

因为需要从 URL 中获取 id 参数。

php$dsn=mysqlhost=localhost;dbname=db_books;try $pdo=new PDO$dsnrootroot;catch Exception $e echo 连接失败$e-getMessage;$id=$_GETid;$sql=select from books where id=$id;$result=$pdo-query$sql;$row=$

原文地址: https://www.cveoy.top/t/topic/cRVY 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录

  • 上一篇: ControllerRequestMappingwarehousingmineraltypepublic class VmMineralTypeController extends BaseController Autowired private IVmMineralTypeService vmMineralTypeService;PostMappinglist Resp
  • 下一篇: 我的车技阿Sir见了也闪避怎么回复

© 2019 • 2025 - 安全问答 站长邮箱:wxgpt@qq.com    ICP备案/许可证号:豫ICP备2024104334号-2