在 32 位模式下从命令行运行 php
是否可以告诉 php 在 32 位模式下从命令行运行脚本?我有一个使用 ODBC 驱动程序的 php 脚本,该驱动程序仅在 PHP 以 32 位运行时才有效。这是我对脚本的调用方式:
php -d safe_mode=0 -f checkImport.php
有什么想法吗?
Is it possible to tell php to run a script from the command line in 32-bit mode? I have a php script that uses an ODBC driver that is only works when PHP is run in 32-bit. Here is how I'm calling the script:
php -d safe_mode=0 -f checkImport.php
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能。 PHP 解释器编译为 64 位或 32 位。您可以做的就是在系统上编译或安装单独的 32 位版本的 PHP。如何做到这一点是非常特定于平台的。
You can't. The PHP interpreter is compiled either as 64-bit or as 32-bit. What you can do is compile or install a separate 32-bit edition of PHP on your system. How to do this is very platform specific.