|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 ? |
|
#2
|
||||
|
||||
|
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
![]() |
|
#3
|
|||
|
|||
|
then, did you have tried to used it?
Could you share some of your knowledge please.. Thank you before.. |
|
#4
|
||||
|
||||
|
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... |
|
#5
|
|||
|
|||
|
Quote:
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. ![]() |
|
#6
|
||||
|
||||
|
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.
|
|
#7
|
|||
|
|||
|
Quote:
ok.. thanks for the help.. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > General - Function exec() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|