Results 1 to 2 of 2

Thread: Executing PHP script from shell in Linux

  1. #1

    Thread Starter
    Addicted Member mralston's Avatar
    Join Date
    Aug 2002
    Location
    Altrincham Nr Manchester, England
    Posts
    141

    Executing PHP script from shell in Linux

    I've got a PHP script that should be executed from the command prompt. Currently I'd have to do something like:

    /pathtophpbinary/php /pathtophpscript/harvest.php

    I'm just wondering if it's possible to put a command on the first line of harvest.php to allow the shell to automatically pick up what interpreter to use...like you'd put on the first line of a Perl script?

  2. #2

    Thread Starter
    Addicted Member mralston's Avatar
    Join Date
    Aug 2002
    Location
    Altrincham Nr Manchester, England
    Posts
    141
    Ok, scrap that question above...I've just managed to do it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width