Jump to content


Photo

PHP script execute another PHP script on windows


  • Please log in to reply
5 replies to this topic

#1 sam2222

sam2222
  • Members
  • Pip
  • Newbie
  • 7 posts

Posted 19 March 2006 - 11:23 PM

Hello,

This is I'm guessing a simple question so sorry but I couldn't find an answer anywhere.

How can I execute a PHP script on windows from another PHP script? I know on linux you type PHP then the script name but on my windows computer it only works from command line when I type the full path to the directory with PHP in it, so is there a way to get PHP to tell me where it is or am I doing it all wrong?

Thanks,
Sam

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 19 March 2006 - 11:27 PM

[a href=\"http://www.php.net/eval\" target=\"_blank\"]http://www.php.net/eval[/a]

#3 sam2222

sam2222
  • Members
  • Pip
  • Newbie
  • 7 posts

Posted 19 March 2006 - 11:36 PM

I can't do that 'cause other script is going to run for a long time so I need it to run in the background hench can't do that but thanks for the answer tho.

#4 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 20 March 2006 - 12:11 AM

You could try [a href=\"http://www.php.net/exec\" target=\"_blank\"]http://www.php.net/exec[/a].

What are you doing that is going to be running for so long?

#5 sam2222

sam2222
  • Members
  • Pip
  • Newbie
  • 7 posts

Posted 20 March 2006 - 12:22 AM

What I'm trying to do is send newsletters to a big list of people so I want it to run in the background 'cause it will take a while and I don't want to do it with the web browser incase I hit the stop button half way thru.

How would I use exec() to start another PHP script? wouldn't I need the path to PHP?

Thanks very much for your help.

#6 rekha

rekha
  • Members
  • PipPipPip
  • Advanced Member
  • 38 posts

Posted 12 February 2008 - 08:51 AM

Hi

The below link will help you


http://hiox.org/index.php?id=138



Regards
Rekha
http://hiox.org










0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users