【发布时间】:2011-12-29 18:42:15
【问题描述】:
我正在查看wpshell - shell,用 PHP 编写(用于 PHP 和 WordPress)。
它似乎是通过 bash 中的以下代码运行的:
#!/bin/bash
shell=$(dirname $(readlink -f $0))"/wpshell.php"
if [ -t 0 ]; then
while [ true ]; do
/usr/local/bin/php $shell
if [ $? -eq 0 ]; then break; fi
done
else
set -f
read -s input
echo $input | /usr/local/bin/php $shell stdin
fi
如何适应 Windows 环境?如果可能的话。
【问题讨论】: