write in database

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
asterix
Posts: 1
Joined: 16 Mar 2015 12:56

write in database

#1 Post by asterix » 16 Mar 2015 13:06

Hi everybody
I have a bat, which works fine:

Code: Select all

:Start
@C:\xampp\php\php.exe -f write_in_database.php

ping -n 10 127.0.0.1>nul
GOTO :Start


The bat is in the same folder as the write_in_database.php.
But I want it to have the bat on the Desktop.
So I changed the code like this, but it doesn't work (undefined variable and failed to open stream - both in the write_in_database.php file.)
Does somebody see the fault?
Thanks a lot!

Code: Select all

@C:\xampp\php\php.exe -f C:\xampp\htdocs\write_in_database.php

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: write in database

#2 Post by Squashman » 16 Mar 2015 14:57

Code: Select all

pushd "C:\xampp\htdocs"
:Start
@C:\xampp\php\php.exe -f write_in_database.php

ping -n 10 127.0.0.1>nul
GOTO :Start

Post Reply