【发布时间】:2015-11-27 11:47:06
【问题描述】:
我的网站有一个索引文件
localhost-->mywebsite-->index.php(这是我的外部脚本)
我已经用 codeigniter 建立了一个注册表。
我可以使用 url http://localhost/codeigniter/index.php/form 的注册表单。
但是我怎样才能将该注册表单附加到我的网站索引文件中。
在我的外部 php 脚本(我的网站的index.php)中使用 include_once"../codeigniter/index.php/form"; 不起作用。
但是,如果我将 'form' 设为默认控制器文件并使用来自外部 php 脚本的以下代码
include_once "codeigniter/index.php"; 效果很好。但是如果我需要其他控制器文件,而不仅仅是'form'?
更新:
我还可以从外部 php 脚本链接到该文件:
<a href="codeigniter/index.php/form>Register</a>.
但不包括在内。每当我包含它时,它都不会显示这样的文件。
【问题讨论】:
标签: php codeigniter url include