Scripts Linux

Reply

Join Date: Jun 2005
Posts: 44
Reputation: namit is an unknown quantity at this point 
Solved Threads: 0
namit namit is offline Offline
Light Poster

Scripts Linux

 
0
  #1
Dec 3rd, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 80
Reputation: Daishi is an unknown quantity at this point 
Solved Threads: 2
Daishi Daishi is offline Offline
Junior Poster in Training

Re: Scripts Linux

 
0
  #2
Dec 5th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 44
Reputation: namit is an unknown quantity at this point 
Solved Threads: 0
namit namit is offline Offline
Light Poster

Re: Scripts Linux

 
0
  #3
Dec 10th, 2005
no this does not seam to be working

do not know why
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 44
Reputation: namit is an unknown quantity at this point 
Solved Threads: 0
namit namit is offline Offline
Light Poster

Re: Scripts Linux

 
0
  #4
Dec 18th, 2005
do i have to set permitions or should it just work?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC