替代PHP exec()函数 [英] Alternate to PHP exec() function

查看:269
本文介绍了替代PHP exec()函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前我正在使用:

exec("zcat $filename", $output)

要解压缩.Z类型的文件,但很遗憾,我的托管公司现在已禁用此功能.

To uncompress a .Z type file but unfortunately my hosting company has now disabled this function.

有解决方法吗?

$pathtofile = "filename.lis.Z";
exec("zcat $pathtofile", $output);

推荐答案

做到这一点

echo ini_get("disable_functions");

了解您是否可以使用以下其中一项:

to know if you are able to use one of the following:

system(); exec(); passthru(); shell_exec();

但是,如果是共享主机,则上述所有内容都将被屏蔽,您将不得不寻找替代方法

but if it's a shared hosting all the above are for sure blocked and you will have to find an alternative

这篇关于替代PHP exec()函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆