Where is it acceptable to put css folders and image file folders? I was thinking inside the view folder? However the controller always reroutes the path to the base url so I have to specify the path in the .html file to where it sits, which is redundant.
相关问题
- Can you set the Location header in a chunked http
- How to use strip_tags with second parameter in Cod
- codeigniter replace array values in model
- How to access variables from other methods inside
- codeigniter $this->upload->do_upload() = false
相关文章
- Private static variables in php class
- File Upload of more than 4GB
- Returning plain text or other arbitary file in ASP
- GuzzleHttp Hangs When Using Localhost
- Codeigniter not logging
- Swift and Objective-c framework exposes its intern
- Loading custom config file into a Codeigniter libr
- Loading and using a codeigniter model from another
add one folder any name e.g public and add .htaccess file and write allow from all it means, in this folder your all files and all folder will not give error Access forbidden! use it like this
I usually put all my files like that into an "assets" folder in the application root, and then I make sure to use an Asset_Helper to point to those files for me. This is what CodeIgniter suggests.
I use the following folder structure:
(I am new to Codeigniter, so I don't know if this is the best advice)
I keep publicly available files in my public folder. It is logical for them to be there, and I don't want to use Codeigniter for something I don't need to use it for.
The directory tree looks likes this:
The only files I keep in /public/ are Codeigniter's index.php, and my .htaccess file:
Hi our sturucture is like Application, system, user_guide
create a folder name assets just near all the folders and then inside this assets folder create css and javascript and images folder put all your css js insiide the folders
now go to header.php and call the css just like this.
This is how I handle the public assets. Here I use Phalcon PHP's Bootstrap method.
Folder Structure
Files to edit
.htaccess*
.htaccess**
index.php***
Modify the
application
path and thesystem
path as,Now you use the
public
folder asbase_url()."public/[YOUR ASSET FOLDER]"
Hope this helps :)