0

How can i use Php in SL playground

Hello , i am bored in vacation and i would like to developp an wep page with php ; i know that i can put html , css and JS in the SL php premade template but my custom CSS animation from a cdn dont launch there :/ How wan i do ? thanks y'all

9th Aug 2017, 5:38 AM
Lucas Lareginie
Lucas Lareginie - avatar
4 Respostas
+ 2
You just write your normal html outside the php tags. Your css will go in style tags and your JS in script tags. Link to your CDN just as you would in a normal html file outside the php tags. It should work (haven't tried yet). something like this: <!DOCTYPE html> <html> <head> <title>Page Title</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <style> body { background: yellow; } </style> </head> <body> <?php echo "Hello, World!"; // more php code here ?> <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> </body> </html>
9th Aug 2017, 6:30 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
It should work (Bootstrap seems to work). You may need to move the css cdn link to the bottom of the body or just download it and copy its contents into the style tags. If you're on android you can download a php server and ide to your device that way you can work with multiple files instead of making a big mess in the playground.
9th Aug 2017, 6:43 AM
ChaoticDawg
ChaoticDawg - avatar
0
hey , thank you for the quick answer ! That was the first thing i tried but doesn't work here :/
9th Aug 2017, 6:31 AM
Lucas Lareginie
Lucas Lareginie - avatar
- 1
alright i'll try that later , thanks !
9th Aug 2017, 6:49 AM
Lucas Lareginie
Lucas Lareginie - avatar