Topic
  • 2 replies
  • Latest Post - ‏2009-02-05T05:38:51Z by SystemAdmin
SystemAdmin
SystemAdmin
1731 Posts

Pinned topic Facing problm to run php file thru batch file in command prompt

‏2009-02-04T12:47:05Z |
Hi All

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
C:\xampp\php>_
So plz anyone help me out......ASAP
Updated on 2009-02-05T05:38:51Z at 2009-02-05T05:38:51Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1731 Posts

    Re: Facing problm to run php file thru batch file in command prompt

    ‏2009-02-04T19:17:02Z  
    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.

    Regards,
    Ambrish Bhargava
  • SystemAdmin
    SystemAdmin
    1731 Posts

    Re: Facing problm to run php file thru batch file in command prompt

    ‏2009-02-05T05:38:51Z  
    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.

    Regards,
    Ambrish Bhargava
    Thanx man....its workin...