{"id":2515,"date":"2015-11-24T22:57:08","date_gmt":"2015-11-24T13:57:08","guid":{"rendered":"http:\/\/taitan916.info\/blog\/?p=2515"},"modified":"2024-01-30T18:14:50","modified_gmt":"2024-01-30T09:14:50","slug":"post-2515","status":"publish","type":"post","link":"https:\/\/taitan916.info\/blog\/archives\/2515","title":{"rendered":"Codeigniter3\u3067\u5916\u90e8\u30d5\u30a1\u30a4\u30eb(CSS \/ JS)\u306e\u8aad\u307f\u8fbc\u307f\u3068\u5171\u901a\u30d1\u30fc\u30c4\u5316\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Codeigniter\u3067CSS\u3084JS\u30d5\u30a1\u30a4\u30eb\u7b49\u306e\u5916\u90e8\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f\u305f\u304b\u3063\u305f\u3002\u307e\u305f\u3001\u305d\u308c\u3092\u30d8\u30c3\u30c0\u30fc\u3084\u30d5\u30c3\u30bf\u30fc\u3068\u3057\u3066\u5225\u30d5\u30a1\u30a4\u30eb\u5316\u3057\u3001\u5171\u901a\u306e\u30d1\u30fc\u30c4\u3068\u3057\u3066\u4f7f\u3044\u305f\u304b\u3063\u305f\u3002\u8a2d\u7f6e\u5834\u6240\u3084\u8aad\u307f\u8fbc\u307f\u65b9\u6cd5\u304c\u5206\u304b\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u8abf\u3079\u305f\u7d50\u679c\u3092\u30e1\u30e2\u3002\u5c1a\u3001Codeigniter4\u7cfb\u306e\u5834\u5408\u306f<a href=\"https:\/\/taitan916.info\/blog\/archives\/3817\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089\u306e\u8a18\u4e8b<\/a>\u3092\u53c2\u7167\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>\u8a2d\u7f6e\u5834\u6240<\/strong><\/h2>\n<p>Codeigniter\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u76f4\u4e0b\u3067application\u3068\u304bsystem\u3068\u304b\u3042\u308b\u968e\u5c64\u306bcss\u306a\u308ajs\u306a\u308a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<p>\u307e\u305f\u3001\u540c\u968e\u5c64\u306b\u4ee5\u4e0bhtaccess\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u3044\u3066\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">RewriteEngine on\r\nRewriteCond $1 !^(index\\.php|images|.+\\.css$|.+\\.js$|.+\\.png$|.+\\.jpg$|robots\\.txt)\r\nRewriteRule ^(.*)$ \/index.php\/$1 [L]<\/pre>\n<p>\u5c1a\u3001\u30d5\u30a9\u30f3\u30c8\u30d5\u30a1\u30a4\u30eb\u3084\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u3092\u547c\u3073\u51fa\u3057\u305f\u3044\u5834\u5408\u306fRewriteCond\u306e\u3068\u3053\u308d\u306b\u62e1\u5f35\u5b50\u3068\u304b\u3092\u8ffd\u8a18\u3057\u3066\u3044\u304f\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>\u8aad\u307f\u8fbc\u307f\u65b9\u6cd5<\/strong><\/h2>\n<p>view\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u76f4\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;link href=\"css\/style.css\" rel=\"stylesheet\" type=\"text\/css\"&gt;\r\n&lt;script src=\"js\/function.js\"&gt;&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<h2><strong>\u5171\u901a\u306e\u30d1\u30fc\u30c4\u3068\u3057\u3066\u4f7f\u3046<\/strong><\/h2>\n<p>\u4f8b\u3048\u3070view\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u76f4\u4e0b\u306bheader.php\u3092\u4f5c\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"ja\"&gt;\r\n&lt;head&gt;\r\n    &lt;meta charset=\"utf-8\"&gt;\r\n    &lt;meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"&gt;\r\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"&gt;\r\n    &lt;title&gt;&lt;?php echo $title;?&gt;&lt;\/title&gt;\r\n    &lt;link href=\"css\/style.css\" rel=\"stylesheet\" type=\"text\/css\"&gt;\r\n    &lt;script src=\"js\/function.js\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;<\/pre>\n<p>\u305d\u3057\u3066\u5b9f\u969b\u306b\u4f7f\u3046\u5834\u5408\u306fcontrollers\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u76f4\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u3068header.php\u3068\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u3042\u308bindex.php\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u3002\u307e\u305f\u3001header.php\u306b\u306f$header['title']\u304c$title\u3068\u3044\u3046\u5f62\u3067\u6e21\u3055\u308c\u308b\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">public function index()\r\n{\r\n    $header['title'] = '\u30bf\u30a4\u30c8\u30eb';\r\n    $this-&gt;load-&gt;view('header', $header);\r\n    $this-&gt;load-&gt;view('index');\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<h2><strong>\u305d\u306e\u4ed6<\/strong><\/h2>\n<p>\u30d8\u30c3\u30c0\u30fc\u3001\u30d5\u30c3\u30bf\u30fc\u3001\u30e1\u30cb\u30e5\u30fc\u3042\u305f\u308a\u306f\u30d1\u30fc\u30c4\u5316\u3057\u3066\u304a\u3044\u3066\u30d8\u30c3\u30c0\u30fc\u306fSEO\u95a2\u9023\u306e\u5185\u5bb9\u3092\u547c\u3073\u51fa\u3057\u6642\u306b\u6e21\u3059\u5f62\u3067\u826f\u3055\u305d\u3046\u3002<\/p>\n<p>\u3042\u3068CSS\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u306f\u4ee5\u4e0b\u306e\u5f62\u3067\u3082\u826f\u3044\u307f\u305f\u3044\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u65b9\u3067$this-&gt;load-&gt;helper('html');\u3067\u30d8\u30eb\u30d1\u30fc\u3092\u8aad\u307f\u8fbc\u307f\u3057\u3066\u304a\u304f\u3002\r\n&lt;?php echo link_tag('css\/style.css'); ?&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Codeigniter\u3067CSS\u3084JS\u30d5\u30a1\u30a4\u30eb\u7b49\u306e\u5916\u90e8\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f\u305f\u304b\u3063\u305f\u3002\u307e ... <\/p>\n","protected":false},"author":1,"featured_media":2517,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,80],"tags":[],"class_list":["post-2515","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","category-codeigniter"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/2515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/comments?post=2515"}],"version-history":[{"count":2,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/2515\/revisions"}],"predecessor-version":[{"id":4491,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/2515\/revisions\/4491"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media\/2517"}],"wp:attachment":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media?parent=2515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/categories?post=2515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/tags?post=2515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}