Jump to content

Passing Arguments


pgrevents

Recommended Posts

Ok what I am trying to do is send an argument to a perl file to execute im making headway but there is an error here is my code

<? php shell_exec('/usr/bin/php get_iplayer  --info > testfile.txt'); ?>

 

The error is getting printed to a text file thats what the > testfile.txt is the error is

X-Powered-By: PHP/5.2.8
Content-type: text/html

<br />
<b>Parse error</b>:  syntax error, unexpected T_STRING in <b>/home/steve/public_html/get_iplayer/get_iplayer</b> on line <b>1610</b><br />

 

No only when I put the /usr/bin/php in the shell_exec do I get any printout whatsoever.

 

I know this script works as I use putty to print that command is there anything on the php side to eliminate this. I think the reason it does error is cause of the usr/bin/php but thats the only line that will make the script react to anything outside shell

 

 

 

 

Link to comment
Share on other sites

Ok what I am trying to do is send an argument to a perl file to execute im making headway but

 

You say you are trying to execute a perl file, but you are running /usr/bin/php.  I'm not sure, but I really don't think PHP will understand PERL.  Is that a typo in your question or just running the wrong interpreter?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.