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: 1,029 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: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4
Time spent in forums: 1 Week 3 h 49 m 58 sec
Reputation Power: 7
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: 443

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: 1,029 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: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4
Time spent in forums: 1 Week 3 h 49 m 58 sec
Reputation Power: 7
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: 1,029 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: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1694514 Folding Title: Super Ultimate Folder - Level 4
Time spent in forums: 1 Week 3 h 49 m 58 sec
Reputation Power: 7
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




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek