Register
It is currently Thu Apr 17, 2014 12:23 pm

Execute on webpage


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Fri Aug 24, 2012 9:19 am   

Joined: Sun Aug 05, 2012 4:20 pm
Posts: 7
Hey,

I have a bash script which cats a file and then echos an output...


Any ideas how i can execute this on a webpage and return results on a webpage?


Top
 Profile  
 PostPosted: Thu Aug 30, 2012 3:30 pm   
Moderator
User avatar

Joined: Wed May 03, 2006 2:05 pm
Posts: 242
Hello blakesmoore!

There are two ways you can go about this!

The simple option (if you have cron access): Have your bash script run on a schedule, and output to an HTML file which will be your web page.

OR: Use a simple php script to run the command and display the output!

Example:
Code:
<?php
echo "<pre>";
system('./test.sh');
echo "</pre>";
?>


Top
 Profile YIM  
 PostPosted: Sat Sep 01, 2012 3:44 am   

Joined: Sun Aug 05, 2012 4:20 pm
Posts: 7
Hey, sorry i figured this out already, was meant to close the topic! thanks!


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP