You are here: Re: Calling java program from PHP? « PHP Programming Language « IT news, forums, messages
Re: Calling java program from PHP?

Posted by Ivαn Sαnchez Ortega on 10/02/79 11:35

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan Gelder wrote:

> Hi, I'm new to PHP but learning fast. I'm already a Java programmer and
> was wondering if there is a way to have a PHP script pass parameters to
> a Java program and put the data back into the page.

Try something like:

<?php

$parameter1='foo';
$parameter2='bar';
$parameter3='quux';

$output = shell_exec("java whatever.jar $parameter1 $parameter2
$parameter3");

echo $output;

?>


- --
- ----------------------------------
IvΓ‘n SΓ‘nchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

Lo que importa es cuanto amor ponemos en el trabajo que realizamos.
-- Madre Teresa de Calcuta. (1910-1997) Misionera yugoslava
nacionalizada india.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDrgD23jcQ2mg3Pc8RAn1gAJwPTpcY0Y4fEACEUWxGhpdtJ+FIwACcCkvy
Qg0x2pfpquyz0T0gj7nPn8g=
=YHtJ
-----END PGP SIGNATURE-----

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация