The Artima Developer Community
Sponsored Link

Java Answers Forum
Help With Java Server

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Andy Etches

Posts: 1
Nickname: seadog
Registered: Oct, 2005

Help With Java Server Posted: Oct 2, 2005 4:27 AM
Reply to this message Reply
Advertisement
I've made a java webserver which can output the HTML pages you request from the root www\ however I want to be able to parse PHP, so far I've tried this:
try {
  Process process = Runtime.getRuntime().exec("php4\\php.exe www\\info.php");
  process.waitFor();						  System.out.println(process);
  pout.println(process);
  process.getInputStream();
  client.close();
} catch (IOException e) {
  System.out.println("IO");
} catch (InterruptedException e2) {
  System.out.println("IE");
}

Which stops me downloading the .php (there's an if statement before this checking if the extension is .php) and outputs the process, however I don't know how to get it to output what the PHP parser outputted, I'd really appreciate some help doing that!
Seadog,

Topic: New to programming and need help Previous Topic   Next Topic Topic: I would like to ask some help....

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use