I have a file as file1.php having contents as....<?php $t1=date("H:i"); echo $t1; ?>.
When am running this file in command prompt as ...
C:\xampp\php>php.exe -f C:\xampp\htdocs\myfolder\file1.php
Its giving result as current time....but
When am tryin to run this file1.php file thru batch file in command prompt like...
C:\xampp\php>php.exe -f C:\xampp\htdocs\myfolder\file2.bat and my file2.bat file content is...
C:\xampp\php\php.exe -f C:\xampp\htdocs\myfolder\file1.php .
After pressing enter its not showing any result, directly coming to....
C:\xampp\php\php.exe -f C:\xampp\htdocs\myfolder\file1.php
So plz anyone help me out......ASAP
Pinned topic Facing problm to run php file thru batch file in command prompt
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2009-02-05T05:38:51Z at 2009-02-05T05:38:51Z by SystemAdmin
Re: Facing problm to run php file thru batch file in command prompt2009-02-04T19:17:02ZThis is the accepted answer. This is the accepted answer.Hi,
Instead of following command
C:\xampp\php>php.exe -f C:\xampp\htdocs\myfolder\file2.bat
Execute: C:\xampp\htdocs\myfolder\file2.bat only.