php shell:如何在现有文件中运行代码

时间:2013-10-12 18:59:35

标签: php shell

启动php shell后

php -a

你如何运行现有的php文件说'index.php'?我知道它可以像

一样运行

$php index.php

从命令行

。但是你如何从shell中做到这一点?

1 个答案:

答案 0 :(得分:3)

你只需加入它:

include 'index.php';