0
Can I insert a php code in an html compiler?
Or can I do it the other way around? Especially with this code! https://code.sololearn.com/wDCO4TEzQ3Q9/?ref=app I suck at java so I am trying to use a php code instead. Now if I make a text area and insert the php code will it interpret everything with this script or is there more to be done (aside from the letters)
9 Antworten
+ 1
Yes , u can use the php code where u want but u should open the php tag and then write codes then close its tag
+ 3
Yes but your file extension should be .php and also to run PHP file you need server like xampp, wampp or ampp
But on Sololearn you can't do.
+ 3
AJ #Infinity Love I think you meant XAMPP, not ZAMMP.
Honest Thomas It's not clear what you're asking or attempting to accomplish.
What do you mean by HTML compiler? Such a thing doesn't exist. Are you referring to the web based code?
If so, as mentioned by AJ, this isn't possible on SoloLearn.
The textarea would need to render in the web page first so you can enter the PHP code.
That part would work. But then, to run that PHP code, it would need to post back to a PHP server where the content of the textarea can be loaded and executed using the eval() function for PHP.
This is the part that won't work on SoloLearn. The Code Playground doesn't support the ability to post to a PHP endpoint from another code where you can handle this request.
You'll need to find another online REPL or run it locally.
+ 3
David Carroll Yes XAMPP 😁
+ 2
Yes. It interprets everything. For a working example see
https://code.sololearn.com/wZ8RE6oxrm5Q/?ref=app
+ 2
Honest Thomas In case of next time, you might want to include your IQ number in the question so that people will answer appropriately. Just saying.
+ 2
Yes but the file extension should be . Php file.
+ 1
Yes, ofcourse
+ 1
wow all of you are useless!
except for the last two. I know it’s not your fault but when replying to a guy with an IQ of 62 about coding keep it simple! But then again... I guess i didn’t explain myself properly. Thanks anyway!