Can not use command line interpreter

前端 未结 9 1170
盖世英雄少女心
盖世英雄少女心 2021-02-05 09:58

I have tried to execute simple php code in the php interpreter. When I executed the command php -a I getting the message

Interactive mode ena

9条回答
  •  心在旅途
    2021-02-05 10:34

    After I got tired of compiling it on each machine I used PHPSH (as mentioned by joey-adams)

    It is much better then php -a (syntax highlighting and autocompletion)

    Install python phpsh

    look at install-php5-with-readline-support-on-debian-wheezy

    $ sudo apt-get install python # this is necessary to run phpsh
    $ cd ~/
    
    $ wget https://github.com/facebook/phpsh/zipball/master
    $ unzip phpsh-master.zip
    
    $ cd phpsh-master
    $ sudo cp -r src /etc/phpsh # phpsh seems to complain unless it resides at /etc/phpsh
    $ sudo ln -s /etc/phpsh/phpsh /usr/bin/phpsh # put phpsh on the $PATH
    

提交回复
热议问题