[文章作者:张宴 本文版本:v1.0 最后修改:2009.01.13 转载请注明原文链接:http://blog.s135.com/post/392/]

  PHPSH 是 Facebook 团队开发的一款交互式 PHP Shell,可以方便地进行PHP命令行测试。

  网址:http://www.phpsh.org/

  安装方法:
cd /opt/
wget http://www.phpsh.org/phpsh-latest.tgz
tar zxvf phpsh-latest.tgz
cd phpsh/
sed -i "s#php -q#/usr/local/webserver/php/bin/php -q#g" phpsh
chmod +x phpsh
ln -s /opt/phpsh/phpsh /bin/phpsh

  注意:上述安装方法中的“/usr/local/webserver/php/bin/php”为您的PHP可执行文件路径。


  使用示例:
[root@localhost ~]# phpsh
I can't find a tags file for you.  To enable tab completion in phpsh,
go to the root directory of your php code and run 'ctags -R',
(or whatever the analagous command is with your version of ctags,)
then run phpsh from that directory or a subdirectory of that directory.

Commandline: /usr/local/webserver/php/bin/php -q /opt/phpsh/phpsh.php
phpsh (c)2006 by Charlie Cheever and Dan Corson and Facebook, Inc.
type 'h' or 'help' to see instructions & features

New Feature: You can use the -c option to turn off coloring
php> = 3 + 4
7
php> = md5("ZhangYan")
28f91f3a4b62ce57b7a533e742e8aae1
php> echo date("Y-m-d H:i:s")
2009-01-13 15:28:19
php> $var = "blog.s135.com"
php> echo $var
blog.s135.com
php> $array = array(array(1,2,3), array("a" => "b", "c" => "d", "e" => "f"), 'g', 'h')
php> = $array
Array
(
    [0] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

    [1] => Array
        (
            [a] => b
            [c] => d
            [e] => f
        )

    [2] => g
    [3] => h
)

php> q

[root@localhost ~]# phpsh



Tags: , , ,
技术大类 » PHP/JS/Shell | 评论(7) | 引用(0) | 阅读(5448)
notsobad Homepage
2009-1-13 21:59
http://pear.php.net/package/PHP_Shell/
pear里面有个php shell
功能和这个差不多
装pear的话就可以
pear install http://download.pear.php.net/package/PHP_Shell-0.3.0.tgz
t
2009-1-13 23:05
php -a 不可以吗?
cc0cc Email Homepage
2009-1-14 09:24
这个东东冒似并没有太大意思
meskycn
2009-1-14 09:33
请研究一下这个

** MySQL-5.1.30 中文分词插件 **

@Author: hightman <MingL_Mar@msn.com>
@Website: http://www.hightman.cn/bbs
@download: http://www.hightman.cn/down/myft-5.1.30-081231.tgz
sleetdrop
2009-1-15 10:14
zeal Homepage
2009-1-16 18:03
需要python2.4以上版本支持。
xLight
2009-2-12 12:38
./php -r "var_dump(1);"
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]