PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 11th, 2008, 09:39 AM
danan danan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 4 danan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m 33 sec
Reputation Power: 0
General - Function exec()

hello all,

i'm new in php and first, sorry if i had a bad english. not too good in english .

i want to know what is exec() function and how to use it in PHP?

could it be used to call a java compiler ?

Reply With Quote
  #2  
Old March 11th, 2008, 09:51 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 996 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 14 h 11 m 36 sec
Reputation Power: 5
Send a message via ICQ to Itsacon
To use an ancient internet proverb: RTFM

So to answer your question: Yes, you could call a java compiler, as long as it is installed on your server, and PHP has permission to call it.
__________________
This is my code. Is it not nifty?

"The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools."
---Douglas Adams


Join the Itsacon fanclub!    
Zero Tolerance: Spammers banned so far: 278

Reply With Quote
  #3  
Old March 13th, 2008, 04:56 AM
danan danan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 4 danan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m 33 sec
Reputation Power: 0
then, did you have tried to used it?
Could you share some of your knowledge please..

Thank you before..

Reply With Quote
  #4  
Old March 13th, 2008, 05:41 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 996 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 14 h 11 m 36 sec
Reputation Power: 5
Send a message via ICQ to Itsacon
what's there to share?
it's like typing a command on the command line. put the command in a string, give it to the exec function and see what happens...

Reply With Quote
  #5  
Old March 14th, 2008, 05:27 AM
danan danan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 4 danan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m 33 sec
Reputation Power: 0
Quote:
Originally Posted by Itsacon
what's there to share?
it's like typing a command on the command line. put the command in a string, give it to the exec function and see what happens...


Oh yes. you're right.
is there anything need to be configure in the server side?

because i try to make directory with the name test and the directory was in htdocs folder.

i've used a xampp with version 1.5.4a.
the code i write down was :

exec('mkdir trust ', $out);
print_r($out);

if i want to run the java compiler, where i must save the compiler?

does it need to place in the same folder as the htdocs folder of xampp?

can you give an example to call the java compiler?
sorry cause i've lot asking to you.

Reply With Quote
  #6  
Old March 14th, 2008, 08:00 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 996 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2Folding Points: 883404 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 14 h 11 m 36 sec
Reputation Power: 5
Send a message via ICQ to Itsacon
If the compiler is installed properly, it should be in the search path (%PATH% on Windows, /bin or /usr/local/bin on Unix), so you should be able to call it from everywhere.

Reply With Quote
  #7  
Old March 18th, 2008, 05:54 AM
danan danan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 4 danan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m 33 sec
Reputation Power: 0
Quote:
Originally Posted by Itsacon
If the compiler is installed properly, it should be in the search path (%PATH% on Windows, /bin or /usr/local/bin on Unix), so you should be able to call it from everywhere.


ok..
thanks for the help..

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > General - Function exec()


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT