简体   繁体   English

如何使用Java Applet调用PHP脚本

[英]How PHP script can be called using Java Applet

I want to access user's scanner using PHP script. 我想使用PHP脚本访问用户的扫描仪。 I know this can be done by using PHP script on Linux based machine. 我知道这可以通过在基于Linux的计算机上使用PHP脚本来完成。

I want to put this script on the server and wanted to run it via Java Applet I don't know Java much also I am not sure if this task can be done by this way. 我想将此脚本放在服务器上,并希望通过Java Applet运行它。我不太了解Java,也不确定是否可以通过这种方式完成此任务。

Please suggest if this is correct way and How to proceed on it. 请建议这是否正确,以及如何进行。

Thanks for your time! 谢谢你的时间!

Can the scanner PHP code be operated purely via parameters in the URL? 扫描程序PHP代码能否仅通过URL中的参数进行操作? If so, then a Java applet could connect to those URLs passing parameters as necessary, and if the PHP script returns information in the HTML output stream (as if it were returning a web page), then the applet can parse the page it 'downloads' from that URL to get the information out. 如果是这样,则Java applet可以根据需要连接到那些传递参数的URL,并且如果PHP脚本在HTML输出流中返回信息(就像它正在返回网页一样),则applet可以解析其下载的页面。从该网址获取信息。 Not elegant, but do-able. 不优雅,但可行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM