后端开发|php教程
thinkphp可加载默认模块,无法加载额外模块是什么原因
后端开发-php教程
按照视频做thinkphp的例子,
如果用以下 url是可以的,IndexAction.class.php 可以运行
http://localhost/thinkp/Admin.php/
个人软件制作网站源码,vscode插件显示,ubuntu系统迁移,tomcat 容器剖析,sqlite查表名,机房服务器有哪些,zuk 插件下载,个人网站 前端框架,小爬虫地图生成器,PHP注释有,广州seo优化公司排名,网上订花网站源码,易语言写网页采集教程,文章类博客模板,jsp页面实现文件下载,瑞曼网站管理系统,织梦程序做淘宝客lzw
但是输入 http://localhost/thinkp/Admin.php/User/index/
或
http://localhost/thinkp/Admin.php/User/index/
都出现以下问题
小程序源码交易,vscode代码片段作用,ubuntu gpio 硬件,tomcat自动掉线,sqlite 数据库占用,前端框架使用率,家里有爬虫好不好,php 图片分享,io域名SEO优化,在线学习网站源码,网页模板html css文件路径,html5自适应模板lzw
错误位置:FILE: E:\wamp\www\thinkp\ThinkPHP\Lib\Think\Core\App.class.phpLINE: 297
融资平台源码,ubuntu与mac os,如何制作爬虫python,php安装php,seo咨询揭阳lzw
[ 错误信息 ]
无法加载模块User
[ TRACE ]
[15-07-19 01:18:07] E:\wamp\www\thinkp\ThinkPHP\Lib\Think\Core\App.class.php (297) App::exec()
[15-07-19 01:18:07] E:\wamp\www\thinkp\admin.php (12) App::run()
admin.php文件在根目录
<?php
define(‘APP_NAME’,’Admin’);
define(‘APP_PATH’,’Admin’);
define(‘THINK_PATH’,’./ThinkPHP’);
require THINK_PATH.’/ThinkPHP.php’;
App::run();
?>
UserAction 文件和IndexAction.class.php 放在Action目录下
E:\wamp\www\thinkp\Admin\Lib\Action\UserAction.class.php
<?php
class UserAction extends Action{
function index(){
echo ‘用户列表’;
}
function add(){
echo ‘User/add’;
}
}
?>
回复讨论(解决方案)
建议你认真阅读一下开发手册 /manual_3_2.html
APP_PATH定义错了,看一下手册吧。结合视频和手册学习效果才好,视频有很多都讲不到
但是输入 http://localhost/thinkp/Admin.php/User/index/
或
http://localhost/thinkp/Admin.php/User/index/
都出现以下问题
这两个不是一样的吗?
define(‘APP_NAME’,’Admin’); Admin应该是folder吧。
http://localhost/thinkp/ Admin/User/index/ 改这样试试。