Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个网站。我希望人们在网站上提交给定问题陈述的源代码。我希望立即响应代码...即显示编译时错误或运行时错误,如果有的话。这一切都应该提交代码后立即完成。完全正确的代码将被接受。如何将 GCC 连接到网络服务器????
您正在引入一些令人难以置信的安全漏洞,从而将此功能暴露给 Internet。但是,试试这个:
exec('gcc test.c', $output, $return); var_dump($output); var_dump($return);