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
Offline 80 posts
since Aug 2005