CodeIgniterのhelperを使ってCSSやJSなどのPATHを生成する
環境:
CSSとJSのディレクトリはCodeigniterのルートディレクトリに配置しています。
codeigniter_root/
|
|-application/
|
|-css/
|
|-js/
|
|-system/
|
コントローラ側の記述例
application/controller/Hoge.php
<?php class Hoge extends CI_Controller { public function __construct() { parent::__construct(); } function index(){ //helperでURL PATHを取得する $this->load->helper('url'); $this->load->view('hoge_view'); } } ?>
Codeigniterのindex.php
Codeigniterの初期状態は、URLに「index.php」を含む設定になっています。
環境:Codeigniter-3.1.4
URL例)
example.com/index.php/news/article/my_article
[参考]Codeigniter公式
CodeIgniter の URL — CodeIgniter 3.2.0-dev ドキュメント
index.phpと同じ階層に.htaccessを設置し、除外ルールを記述することでURLから「index.php」を省略してアクセスすることができます。
URLから「index.php」を取り除きたい場合は以下の通りです。
Apacheの設定
.htaccessの読み込みが有効になっていることを確認
AllowOverride 「None」の場合は「All」に変更してApacheを再起動する
# # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All
.htaccessの編集
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L]
config.phpの編集
application/config/config.phpの[index_page]を''に変更
/* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = '';
atomが起動しなくなったときの備忘【Win】
起動エラーの場合は、何らかしらのパッケージが邪魔・悪さをしている可能性が高いようです。
1.atomをセーフモードで起動してみる
コマンドプロンプトで実行
atom --safe
※セーフモードは「パッケージを一切読み込まない」モード
2.全パッケージを最新化してみる
apm update
例)
C:\>apm update Package Updates Available (1) └── japanese-menu 1.12.0 -> 1.13.0 Would you like to install these updates? (yes) yes Installing japanese-menu@1.13.0 to C:\Users\xxxxx\.atom\packages done
これで起動しなければ、最近追加したパッケージを疑う
3.apm listでパッケージを一覧化して不要パッケージを削除する
apm uninstall パッケージ名
【追記】
4.SquirrelSetup.logを確認
PukiWikiの備忘
【環境】
PukiWiki:Version 1.5.1
PHP 5.4.16
PukiWiki公式サイトマニュアルページの備忘リンク
インストール・初期設定
https://pukiwiki.osdn.jp/?PukiWiki/Install#ga890799
特定ページに認証をかけたい場合
https://pukiwiki.osdn.jp/?PukiWiki/Authentication
MenuBarのQA -- QA デザイン CSS --
https://pukiwiki.osdn.jp/?Q%EF%BC%86A/%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3%E3%83%BBCSS#ub313802
カスタマイズ全般
https://pukiwiki.osdn.jp/?%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%9E%E3%82%A4%E3%82%BA