Windows PHP script problem

Discussion in 'Programming/Scripts' started by richj1232003, Nov 1, 2006.

  1. richj1232003

    richj1232003 New Member


    I have created a windows PHP script which I place it in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs. My question is can I write a windows PHP script and inside the script it will connect to a UNIX server and then run the Korn shell script? If so, what are the commands?

    Thank you.
  2. Ben

    Ben Active Member Moderator

    Just for the access and executing commands you do not need php on the windows box, because running commands on the linux box you can simply do with an ssh client.
    This command will list files older than 30 days in the specified dir... nearly the same way you could run a script.

    But sometimes you need to source your userprofile first, before executing any script:
    So this example shows how to run more than one command in a sequence.

    If you now wish to run systemcommands out of your php script, you can e.g. do that with `` (backtiks), exec(), system(), etc... for more see the crosslinks to that commands on

    EDIT: And that thread ( gives you an example how you can directly do an ssh connection with php...
    Last edited: Nov 2, 2006

Share This Page