Please come in. Why can I execute my Php script in the browser? why can I execute it in the browser, when I run the php command, an error is reported, indicating that the driver cannot be found? My script uses pdo to connect to sqlserver, but my pdo is installed and enable. it is no problem to execute it in the browser. The result is php xxxx. if php commands are used to batch process this php script, an error is reported, but the driver cannot be found?
Reply to discussion (solution)
Php running in web mode and command line mode uses different php. ini
If you have a single PHP file and an error is reported, the syntax is incorrect.
If other PHP files are introduced, the path is incorrect.
Php running in web mode and command line mode uses different php. ini
Thanks for your guidance, The-c parameter is used to solve the problem.
If you have a single PHP file and an error is reported, the syntax is incorrect.
If other PHP files are introduced, the path is incorrect.
This is indeed the question on the first floor.