我有以下目录结构。
application
|
| -----> controller
|
| ------> profie_control.php
assets
|
| ------> Others
|
|---> uploadify
|
| --> uploadify.php
现在我的uploadify.php
我正在做我想要执行的所有事情。然后在完成所有事情之后我想调用一个函数并在profile_control.php
中将数据传递给它。现在我不知道如何访问这些功能。
我尝试使用以下代码
include_once("http://localhost/php/ci/index.php/profile_control/myfunction");
uploadify.php
中的但是它给了我以下错误
Warning: include_once() [function.include-once]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in C:\wamp\www\php\ci\assets\Others\uploadify\uploadify.php on line 8
我在一些论坛上读过这种方法并不好,因为它可能导致安全问题。现在我如何安全地将数据从uploadify.php
发送到profile_control.php
或者更好的替代方案???
答案 0 :(得分:0)
您不能通过URL包含/要求,但您可以按路径包含/要求,这就是您要执行的操作。在您的控制器中:
include_once("../../assets/Others/uploadify/uploadify.php");
some_func(); // function from file 'uploadify.php'