943,634 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1588
  • PHP RSS
Dec 3rd, 2005
0

Scripts Linux

Expand Post »
I have writen a scipts in linux its called user.sh

i wounder how do i run it in a php script

I can if i just run it in command line ./user.sh it works perfect

but can i add it into my code.

thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
namit is offline Offline
44 posts
since Jun 2005
Dec 5th, 2005
0

Re: Scripts Linux

Quote originally posted by namit ...
I have writen a scipts in linux its called user.sh

i wounder how do i run it in a php script

I can if i just run it in command line ./user.sh it works perfect

but can i add it into my code.

thanks
You sure can do that. Assuming that user.sh is in the same directory as the php page, just use the backtick operator:

[PHP]<?php
`./user.sh`;
?>[/PHP]

If user.sh isn't in the same directory, try using the full path name to user.sh instead of ./user.sh. Good luck.

-Fredric
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
Daishi is offline Offline
80 posts
since Aug 2005
Dec 10th, 2005
0

Re: Scripts Linux

no this does not seam to be working

do not know why
Reputation Points: 10
Solved Threads: 0
Light Poster
namit is offline Offline
44 posts
since Jun 2005
Dec 18th, 2005
0

Re: Scripts Linux

do i have to set permitions or should it just work?
Reputation Points: 10
Solved Threads: 0
Light Poster
namit is offline Offline
44 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Jumping into Php
Next Thread in PHP Forum Timeline: Shrink images





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC