If you use the wamp integrated installation environment, Your php configuration is in D: wampbinapacheApache2.2.17bin. You need to copy and overwrite php under D: wampbinphpphp5.3.3. ini. Otherwise, an error will be reported when you call the extension function, for example, Fatalerror: Calltoundefinedfunction.
If you use the wamp integrated installation environment, Your php configuration is in D: \ wamp \ bin \ apache \ Apache2.2.17 \ bin. You must copy and overwrite D: php under \ wamp \ bin \ php \ php5.3.3. ini. Otherwise, an error will be reported when you Call the extended function, for example, Fatal error: Call to undefined function.
If you use the wamp integrated installation environment, Your php configuration is in D: \ wamp \ bin \ apache \ Apache2.2.17 \ bin
You need to copy and overwrite php under D: \ wamp \ bin \ php \ php5.3.3. ini. Otherwise, an error such as Fatal error: Call to undefined function will be reported when you Call the extended function.
If you are too lazy to write such a long string of php paths, you can add D: \ wamp \ bin \ php \ php5.3.3 to the environment variable path.
In addition, we have questions about parameter passing. For example, I want to execute test. php? A = 123
In the command line, we can write php test. php 123
Use $ argv [1] In test. php to receive 123.
Attach a bat executable file for reference
@ Echo offphp D: \ wamp \ www \ taobao \ items. php 158345687php D: \ wamp \ www \ taobao \ refunds_up.php 158345687php D: \ wamp \ www \ taobao \ trade. php 158345687echo. & echo press any key to close the BAT window... & pauseexit
Original article address: Considerations for using the PHP Command Line to execute the PHP script. Thank you for sharing it with the original author.