[英]WAMP - running php file through localhost working fine giving FATAL error while running through batch
I have WAMP installed on my PC, I have my project placed inside C:/WAMP/WWW/MY_PROJECT_NAME/
我的PC上已安装WAMP,我的项目位于
C:/WAMP/WWW/MY_PROJECT_NAME/
I have placed PHP file sendmail.php
in C:/WAMP/WWW/MY_PROJECT_NAME/
directory When i am running these file through browser http://localhost/MY_PROJECT_NAME/sendmail.php
it working fine, Mails are sending as expected. 我已将PHP文件
sendmail.php
放在C:/WAMP/WWW/MY_PROJECT_NAME/
目录中,当我通过浏览器http://localhost/MY_PROJECT_NAME/sendmail.php
运行这些文件时,它工作正常,邮件按预期发送。
I have created batch file to run same php file sendmail.php
, code of my batch file is as below 我创建了批处理文件以运行相同的php文件
sendmail.php
,我的批处理文件的代码如下
C:\wamp\bin\php\php5.5.12\php.exe" -f "C:\wamp\www\MY_PROJECT_NAME\sendmail.php
My problem is when I am executing same php file with batch, it is giving me fatal error 我的问题是当我批量执行相同的php文件时,它给了我致命错误
call to undefined function oci_connect()
调用未定义的函数oci_connect()
Can any one help why fatal error
is showing while executing php script through batch ? 任何人都可以帮助为什么批量执行php脚本时显示
fatal error
吗?
The php.ini
file used by PHP CLI is in PHP CLI使用的
php.ini
文件位于
C:\wamp\bin\php\php5.5.12\php.ini
the php.ini
file used by Apache is Apache使用的
php.ini
文件是
C:\wamp\bin\apache\apache{versionnumber}\php.ini
make sure you have added/uncommented the oci
extension to the PHP CLI `php.ini file as well as the Apache version. 确保已将
oci
扩展名添加/取消注释到PHP CLI`php.ini文件以及Apache版本中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.