Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

running .sh file thorough php

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

running .sh file thorough php

Postby penguino » Mon Oct 29, 2012 9:51 am

Hello I hope you could help me accomplish this:
I would like to make a page for personal use to run .sh files through links.
So the page will have links as shortcuts to sh files on my computer and run it without any prompts.

I have no clue in php but know html.

Thank you.
penguino
New php-forum User
New php-forum User
 
Posts: 8
Joined: Mon Oct 29, 2012 9:42 am

Re: running .sh file thorough php

Postby jinijames » Tue Oct 30, 2012 4:49 am

I guess i am not sure , any way check it out -

<?php

shell_execute('sh filename.sh');
?>

hire php developer | hire magento developer
jinijames
New php-forum User
New php-forum User
 
Posts: 20
Joined: Fri Oct 19, 2012 4:32 am
Location: India

Re: running .sh file thorough php

Postby penguino » Tue Oct 30, 2012 9:51 am

it works thank you :)
penguino
New php-forum User
New php-forum User
 
Posts: 8
Joined: Mon Oct 29, 2012 9:42 am

Re: running .sh file thorough php

Postby seandisanti » Tue Oct 30, 2012 12:22 pm

just throwing in my $.02 here, but you really probably don't want to do that.especially if that computer is going to be connected to the internet
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm

Re: running .sh file thorough php

Postby penguino » Wed Oct 31, 2012 1:23 am

thank you for the tip, I thought about it.. I want to create a web-based local host shortcuts launcher. For now it doesn't run programs and processes and looking for how to do that. I saw it's been done in the Joly OS I think through html 5 and wondering how they managed that.. any ideas of how to achieve this?
penguino
New php-forum User
New php-forum User
 
Posts: 8
Joined: Mon Oct 29, 2012 9:42 am

Re: running .sh file thorough php

Postby seandisanti » Thu Nov 01, 2012 9:12 am

personally, i use logmein.com for my windows and macs, and teamviewer for my linux machines. both have web based remote control, and smart phone apps that i use on my phones and tablets to control any of my machines.
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.