我不得不在shell脚本中进行划分,最好的方法是:
result1=`echo "scale=3; ($var1 / $total) * 100"| bc -l`
result2=`echo "scale=3; ($var2 / $total) * 100"| bc -l`
Run Code Online (Sandbox Code Playgroud)
但我想比较的价值$result1
和$result2
使用if test $result1 -lt $result2
或if [ $result1 -gt $result2 ]
不工作:(
知道怎么做吗?
我在不同的扩展上尝试了这些步骤,但我不知道为什么这不起作用.之后我不应该看到phpinfo()
输出的变化吗?
步骤:
ext/ext_name
phpize
configure
make
make install
)有什么遗失的吗?我需要在php中启用某个扩展,并且没有办法重新编译整个php版本..