如何处理 php 中的循环和运行时错误程序
我想创建一个可以接受C代码程序的网络,使用php & 编译并在我的服务器上运行该程序。海湾合作委员会。但我无法处理无限循环程序,它让我内存不足。对于运行时错误程序,它会使我的浏览器崩溃。我应该怎么做才能解决这个问题?非常感谢。
I want to create a web that can accept C code program, compile, and run the program on my server using php & gcc. But i can't handle infinite loop program, it's give me out of memory. And for runtime error program it's make my browser crash. What should i do to handle that problem? Many thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那些需要用户输入的程序呢? PHP 对此一无所知,并且事情会冻结在
shell_exec()
阶段。您真的想打开允许任意 C 代码在您的服务器上运行的大门吗?这几乎相当于在你家的前门上贴了一个大牌子,上面写着“进来,免费的房子里的东西!偷走一切!享受!”。What about programs that require user input? PHP would know nothing about that and things would freeze at the
shell_exec()
stage. Do you really want to open the door to allowing arbitrary C code to be run on your server? This is pretty much the equivalent of putting a big sign on your house's front door saying "Come in, free house contents! Steal everything! Enjoy!".