How can I allow CSS in a custom framework? I use a framework from this video link. But it does not allow the use of CSS, JS or any kind of files besides PHP. I have tried checking if the file contains CSS and then excluding it but that also does not work. Does anyone have any suggestions? Here is the link to the github project.
Advertisement
Answer
You can use HTML in PHP files
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="style.css"> </head> <body> <?php require_once('Routes.php'); function __autoload($class_name) { if (file_exists('./classes/'.$class_name.'.php')) { require_once './classes/'.$class_name.'.php'; } else if (file_exists('./controllers/'.$class_name.'.php')) { require_once './controllers/'.$class_name.'.php'; } //a special function in php that autoloads //classed from ur classes folder } ?> </body> </html>