#1
  1. No Profile Picture
    Ulrik N
    Guest
    Devshed Newbie (0 - 499 posts)
    How do I execute one .php3 script from another.
    Passing one or two arguments, and then receiving
    the output?

    I have tried using the exec and passthru function,
    with no luck.

    -ulrik-


    ------------------
    -ulrik-
  2. #2
  3. No Profile Picture
    moderator
    Guest
    Devshed Newbie (0 - 499 posts)
    PHP scripts are interpeted thus you cannot "run" them. However, you could include() one in your script which basically does the same thing.
  4. #3
  5. No Profile Picture
    Ulrik N
    Guest
    Devshed Newbie (0 - 499 posts)
    Thanks, I got the picture...

    ------------------
    -ulrik-
  6. #4
  7. No Profile Picture
    jfl.dk
    Guest
    Devshed Newbie (0 - 499 posts)
    You can do it like this :
    exec("chp3php.exe -q d:weblibSendMemberMail.php3");

    But I can't make exec let go of it, so it hangs. Any suggestions anyone ?
  8. #5
  9. No Profile Picture
    riddler
    Guest
    Devshed Newbie (0 - 499 posts)
    I would like to be able to do this myself.

    The header() function can redirect the browser to a new page, but only at the very beginning -- not good enough.

    Since I haven't yet found a way within PHP to just say switch_to_page ("new.php3"), I've been cheating and using JavaScript:

    echo ("<SCRIPT>self.location.replace('new.php3');</SCRIPT>");
    exit;

    It's an ugly and flawed solution and I hate it. It would be great if anyone could offer a better way.

Similar Threads

  1. Pl scripts are not getting executed.
    By bala_sd in forum Perl Programming
    Replies: 3
    Last Post: January 15th, 2004, 04:59 PM
  2. Cook scripts conflict
    By soon in forum HTML Programming
    Replies: 0
    Last Post: December 22nd, 2003, 01:42 PM
  3. probs uploading pics to NT server using perl scripts
    By web@ack in forum Perl Programming
    Replies: 1
    Last Post: December 2nd, 2003, 05:36 AM
  4. Perl to PHP scripts !?
    By Dobie Gillis in forum PHP Development
    Replies: 2
    Last Post: October 30th, 2003, 06:48 PM
  5. php scripts stopped working
    By t.bag in forum PHP Development
    Replies: 7
    Last Post: April 16th, 2003, 10:38 AM

IMN logo majestic logo threadwatch logo seochat tools logo