启动fis的调试服务器(注意添加 --no-rewrite 参数),如果报错 没有php-cgi环境,请 安装 它,并把php-cgi命令加到系统的环境变量中:
fis server start
checking java support : v1.6.0
checking php-cgi support : unsupported php-cgi environment
[NOTIC] launching java server.
starting fis-server ... at port [8080]
浏览时直接输出php代码了。。。
setTemplateDir($root . '/template'); $smarty->setConfigDir($root . '/config'); $smarty->addPluginsDir($root . '/plugin'); $smarty->setLeftDelimiter('{%'); $smarty->setRightDelimiter('%}'); $smarty->assign(include($root . '/data/index.php')); $smarty->display('page/index.tpl'); ?>
但是在终端可以运行php:
==>php
song==>php -v
PHP 5.3.5-1ubuntu7.11 with Suhosin-Patch (cli) (built: Sep 12 2012 18:47:04)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
请问我该如何设置php-cgi?