【问题标题】:Allow css in framework [closed]在框架中允许 CSS [关闭]
【发布时间】:2022-01-26 12:51:09
【问题描述】:

如何在自定义框架中允许 CSS? 我使用这个视频link 中的一个框架。但它不允许使用 CSS、JS 或 PHP 以外的任何类型的文件。我尝试检查文件是否包含 CSS,然后将其排除,但这也不起作用。有没有人有什么建议?这是link to the github project

【问题讨论】:

标签: javascript php css sass frameworks


【解决方案1】:

您可以在 PHP 文件中使用 HTML

<!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>

【讨论】:

    猜你喜欢
    • 2010-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多