Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running commands on a server using PHP

Status
Not open for further replies.

Mozza456

Programmer
Feb 13, 2005
2
EU
I would like to know how to run the following line of code using php (if its possible).

Javac e:\websites\HelloJava1.java

Basically I have a form which posts file name to the php form and i would like that to run the java compiler to create the class file. I can get the data to pass to the php page but when I try and run the command i don't get any response.

All help greatly appreciated.
 
have a look at the exec() command on the php.net website
 
i've tried using exec() but it just freezes the website until it times out. are there any other things i would need to set up to allow it to create files? would there be anything in apache that would need altering?

Many thanks.
 
you'd need to be sure that the permissions on the directory were set up ok.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top