duanlan7239 2013-03-20 09:40
浏览 55
已采纳

用于c ++代码的Web前端

I have c++ code that can be compiled under Linux, windows or Mac OS. The code compares two images. I would like to have its front end running on a browser and make available to the www.

I am familiar with hosting and dns and that is not the issue. what I can't seem to figure out is:

  1. How do I invoke the script once the image is uploaded by users?

  2. The results from the code needs to be displayed back to the browser. How can a callback be set up for this?

Is there a php solution? Or python (with flask)?

  • 写回答

3条回答 默认 最新

  • dongpanbo4727 2013-03-20 09:43
    关注

    You can either call the C++ application from PHP with exec and then return to browser whatever result is there. This is quick and not good idea. Better approach is to have a service/daemon in C++ running and taking tasks from queue (like RabbitMQ for example). This is scalable solution but requires more effort to implement.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥20 数学建模数学建模需要
  • ¥15 关于#lua#的问题,请各位专家解答!
  • ¥15 什么设备可以研究OFDM的60GHz毫米波信道模型
  • ¥15 不知道是该怎么引用多个函数片段
  • ¥30 关于用python写支付宝扫码付异步通知收不到的问题
  • ¥50 vue组件中无法正确接收并处理axios请求
  • ¥15 隐藏系统界面pdf的打印、下载按钮
  • ¥15 基于pso参数优化的LightGBM分类模型
  • ¥15 安装Paddleocr时报错无法解决
  • ¥15 python中transformers可以正常下载,但是没有办法使用pipeline