app/Views/templates folder is not found in CodeIgniter - php

Folder which is said to be where all the page templates located at could not be found with the following error: cd: templates: No such file or directory.
Will it be okay to re create the folder or is there something missing and need to be restored ?

Yes you have to create your folder app/Views/templates/ and add your templates inside.
CodeIgniter does not create the folder automatically.

Related

Change Laravel storage path to outside of instalation directory

I have installed Laravel on /var/www/html/website but now I want to change storage path to /mnt/volume
So for doing this, I added this code in bootstrap/app.php
app()->useStoragePath('/mnt/volume/public/');
Now upload works fine, but after upload, a file new extra directory created like:
/mnt/volume/public/mnt/volume/mnt/volume/public/bookimages/77iF2Gdr7pKXXLRLovgIpfcKBxY1h7CRqKjc35SC.jpeg
which as you can see Laravel created mnt/volume/mnt/volume directory again.
Laravel Framework 5.5.44
Now, How can I solve this issue?
Create a custom disk in your filesystem.php config file with the root property set to your custom path instead

Laravel Simple File Manager

How can I show files and folder recursively. Like if I set a directory/path that will load inner folder and files of that folder.
I need simple file manager for browser files and folder , not EL-Finder like one.
I use Laravel file manager
Laravel file manager

load a page inside a folder in codeigniter

I have changed the name of codeigniter and placed htdocs then in application folder I have created a new folder in that new folder again I created some folders for different web pages in each and every folder I added controllers,models,view files. Now I want to access a controller file which is in the new folder.
I tried with default route but not working..Can anyone suggest
Create as many folders as you want inside the controller model and view folders in CodeIgniter and not outside them if you really want to organise them.
Remember to set base URL in application/config/config.php file and default router inside the application/config/routes.php file.
If you have problems please comment below describing errors.

include a php file in magento admin panel

I am creating a module called "Web" in magento 1.7.2. Folder structure is like app/code/local/Company/Web/ then Block, controllers, Model, etc, Helper. Again under controllers creating Adminhtml folder and IndexController.php file. Under Adminhtml folder ProductController.php file is there. I have another one file which is in my root folder called reader.php file. I want to include that file in my ProductController.php file. But unable to do so. I have tried by the following code:
$basePath = Mage::getRoot();
include($basePath.'/reader.php');
Please help me how to include the file.
Thanks in advance.
Mage::getRoot() gives you the app folder. You should use Mage::getBaseDir() instead. That will give you your absolute base dir.

config codeigniter to run first project

I am using xampp and my document root in apache is set to htdocs directory by default. I download Codeigniter and unzip the project into this directory. It runs fine. Now I would like to use CI to create my own project. In the controllers folder I would like to create a folder named “myproject” and in the views folder of application folder, I would like to create a folder named “myproject_view” in which I will store all of my view files. My problem is I don’t know how to reset my config file (especially the route.php) for my project to work then.
CodeIgniter documentation doesn’t have a section to specify how to do this, the information given in URI Routing chapter is not enough for readers to understand this at all. Plus, What if I also would like to store my controler files in a nested folder (controllers > somefolder > someanotherfolders > etc) ? Thank you very much.
[UPDATE]
If you only leave all controller in controllers folder, and view files in the views folder, then things work out easily, what if you create a folder in teh controllers and a folder for view in the views folder. I guess you need to change your default route configuration. I would like to know HOW ?
CodeIgniter's documentation covers Sub-Folders for Controllers.
Views on the other hand, are always loaded from controllers. Therefore, you can write:
$this->load->view('my_folder_name/my_view');
Routes are not required here.

Categories