I am creating a new website to help the students to learn new coding concepts did any one know how to add an online code compiler to my website hosted in infinityfree
It will require
eval() function. This function is not allowed. So that cannot be done
What you need depends on what kind of code you’re looking to compile.
But remember that running user submitted code on your website is very dangerous if done improperly.
Just like w3schools and other websites i what to create a tryityouself button to the already return code but i don’t know how to add a compiler to my website
You can embed external services for it to your site.
External services like:
Again, what kind of code are you looking to compile? Which programming languages would you like to offer?
Almost every programming language requires a different compiler and/or runtime environment, so it matters a lot which programming language you’re looking to use.
i want to provide python and c to my users
Sadly. This hosting only supports php and mysql. You can do this about python by upgrading to premium.
Just to note, while you can host Python code on premium hosting, running third party code on your own account is EXTREMELY dangerous. While it’s technically possible to isolate such scripts, you won’t find the required tools on a web hosting provider (because those same tools are used to restrict your own website - and so the provider can’t let you access those tools yourself).