我需要在tcl脚本页面中调用php页面。
如何在TCL脚本页面中嵌入codeigniter php?请帮我。
答案 0 :(得分:0)
试试这个:
eval "exec php -q /path/to/your/codeigniter/index.php yourController yourMethod"
也许您必须在index.php中进行一些更改才能执行它... 我建议你为cls创建一个特定的文件...复制你的index.php并把它放在文件的乞讨处:
/* we don't need to be limited by...normal limitations */
set_time_limit(0);
ini_set('memory_limit', '256M');
/* make sure this isn't being called by a web browser */
if (isset($_SERVER['REMOTE_ADDR'])) die('Permission denied.');
/* set some constants */
define('CMD', 1);
/* manually set the URI path based on command line arguments... */
unset($argv[0]); /* ...but not the first one */
$_SERVER['QUERY_STRING'] = $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'] = '/' . implode('/', $argv) . '/';
并调用此文件而不是index.php ...
并且不知道这是否有效......但这可能是你的起点......