fuelphpについてです。
下記の構造の時、
views/index.phpからlib/test.jsonを呼び出す場合はどうしたらいいでしょうか。
要は、publicより上の階層にあるファイルを呼び出したい場合を知りたいのです。
fuelphpにはAsset:find_fileなどありますが、そもそもAssetクラスはpublic配下のファイルを対象にしてるので使えず。
具体的なところを話しますと
views/index.phpはswagger-uiのindex.htmlです。
lib/test.jsonはビューを生成するファイルです。
views/index.phpからこのlib/test.jsonを読み込みたい場合どうしたらよいでしょうか。
$ cd /var/www/html
$ ln -s ../../../prpduction/sample/public index.php
example.com
├─product
│ └─sample
│ ├─fuel
│ │ ├─app
│ │ │ ├─cache
│ │ │ │ ├─classes
│ │ │ │ ├─controller
│ │ │ │ ├─model
│ │ │ │ └─presenter
│ │ │ ├─config
│ │ │ ├─migrations
│ │ │ ├─modules
│ │ │ ├─tasks
│ │ │ ├─tests
│ │ │ ├─themes
│ │ │ ├─tmp
│ │ │ ├─vendor
│ │ │ └─views
│ │ │ └─index.php
│ │ ├─core
│ │ ├─packages
│ │ └─vendor
│ ├─lib
│ │ └─test.json
│ └─public
│ └─assets
│ ├─css
│ ├─fonts
│ ├─img
│ └─js
│
└─var
└─www
└─html
└─index.php(../../../prpduction/sample/public)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。