For a student project I am creating an online php tutorial.
The idea being that there will be an example snippet of php demonstrating what is to be done (perhaps a very basic array) and then asking the user to have a go at coding it themselves.
Is there a way of allowing the user to write and 'compile' the code within the page and not have to use a separate text editor?
Or is this wishful thinking?!
Any thoughts would be appreciated (I am new to php!)...
Embedded text editor??
Moderator: General Moderators
- evilmonkey
- Forum Regular
- Posts: 823
- Joined: Sun Oct 06, 2002 1:24 pm
- Location: Toronto, Canada
I agree with evil monkey; it is very dangerous to do this; you may be able to get away with it if you look for dangerous functions before compiling and return an error if anything is found. Although I can think of creative ways to hose your web server just using an echo function... like echo'ing out the database username and password.
Wishful thinking... or very trusting.
Wishful thinking... or very trusting.
Last edited by Slippy on Mon Nov 22, 2004 6:33 pm, edited 1 time in total.
-
MeesterCat
- Forum Newbie
- Posts: 2
- Joined: Sun Nov 21, 2004 3:58 pm