分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 技术分享

thinkPHP问题记录

发布时间:2023-09-06 02:20责任编辑:熊小新关键词:PHP
  1. 路由组合变量问题
  • 按照下面的顺序 http://localhost/tp5/public/hello-dfggfqw21321 变量 name 会无法正确传递,但 http://localhost/tp5/public/hello/dfggfqw21321可以

     ???Route::get(‘hello/[:name]‘, ‘index/hello‘); ???Route::get(‘hello-<name>‘, ‘index/hello‘);
  • 而按照下面的顺序则两种链接均可正确传值

     ???Route::get(‘hello/[:name]‘, ‘index/hello‘); ???Route::get(‘hello-<name>‘, ‘index/hello‘);
  1. 路由后找不到模板文件
  • 加上下面的语句会提示找不到模板,但是去掉 @ 就好了,不知道加不加 @ 有什么区别

     ???Route::get(‘he‘, ‘@entry/ctrl/hell‘);

thinkPHP问题记录

原文地址:https://www.cnblogs.com/liupy/p/9879200.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved