LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-18-2004, 12:07 PM   #1
jeucken
Member
 
Registered: May 2002
Location: Alphen aan den Rijn, The Netherlands
Distribution: SuSE 10.1
Posts: 87

Rep: Reputation: 15
Execute file from webpage


Hi,
I'm trying to find out how I can execute a file by clicking on a button on my website.

I have a simple PHP test site running on my webserver. Now I would like to create a button on it that, when you press it, executes a file on the server itself. (Like a script, or for example a Half-Life server)

Does anyone have any experience with this?
 
Old 03-18-2004, 12:58 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Take a look at php exec:
http://www.php.net/exec

Moved to programming
 
Old 03-18-2004, 02:05 PM   #3
naflan
Member
 
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94

Rep: Reputation: 15
<?php

exec("command");

>

to view output of command:

exec("command 2>&1",$output);
while(list(,$val)=each($output)) :
print("$val<br>");
endwhile;
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I execute a .bin file? andi_kan Linux - Newbie 3 11-16-2005 08:15 AM
execute .el file balloon Linux - Software 2 11-16-2004 06:02 AM
how to execute .sh file sagar Linux - Software 4 11-05-2004 06:21 PM
cannot execute binary file babaliciouse Linux - Software 2 10-21-2004 11:50 AM
how to execute a file malik Linux - Software 1 06-10-2004 08:53 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration