codeigniter-3

How to configure NGINX for codeigniter and laravel on same domain

蹲街弑〆低调 提交于 2021-02-18 19:11:01
问题 I need to configure nginx for different location on same domain for two php frameworks. example.com/ - codeigniter (root /var/www/html/codeigniter) example.com/api - laravel 5.2 (root /var/www/html/laravel) here my examples, but they not work. server { listen 80; server_name example.com www.example.com; root /var/www/html/codeigniter; index index.php; location / { try_files $uri $uri/ /index.php; } location ~ \.php$ { try_files $uri /index.php =404; fastcgi_split_path_info ^(.+\.php)(/.+)$;

How to configure NGINX for codeigniter and laravel on same domain

独自空忆成欢 提交于 2021-02-18 19:10:03
问题 I need to configure nginx for different location on same domain for two php frameworks. example.com/ - codeigniter (root /var/www/html/codeigniter) example.com/api - laravel 5.2 (root /var/www/html/laravel) here my examples, but they not work. server { listen 80; server_name example.com www.example.com; root /var/www/html/codeigniter; index index.php; location / { try_files $uri $uri/ /index.php; } location ~ \.php$ { try_files $uri /index.php =404; fastcgi_split_path_info ^(.+\.php)(/.+)$;

How to authenticate specific single page/URL in .htaccess and Codeigniter?

谁都会走 提交于 2021-02-11 13:52:48
问题 This is my .htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] RewriteRule ^([^\.]+)$ $1.php/$1 [L] </IfModule> AuthType Basic AuthName "Restricted Content" AuthUserFile .htpasswd Require valid-user I have Add htaccess authentication only for this URL "welcome/list" no another all pages/URLs 回答1: #Set an environment variable for the URI you want to handle SetEnvIf Request_URI "

How to authenticate specific single page/URL in .htaccess and Codeigniter?

喜欢而已 提交于 2021-02-11 13:51:29
问题 This is my .htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] RewriteRule ^([^\.]+)$ $1.php/$1 [L] </IfModule> AuthType Basic AuthName "Restricted Content" AuthUserFile .htpasswd Require valid-user I have Add htaccess authentication only for this URL "welcome/list" no another all pages/URLs 回答1: #Set an environment variable for the URI you want to handle SetEnvIf Request_URI "

CKFinder modal opens homepage and does not show files

感情迁移 提交于 2021-02-11 12:47:16
问题 I am using CKFinder in a CodeIgniter project and the problem I have is that when I click to open the modal to upload new media the modal shows the homepage of my project and not the files in the folder. I am rebuilding the project from another project, so in earlier stages, CKFinder was working well. Things I suspect caused the problem: I changed the session driver from 'files' to database When I first built the project is was on http now it is on https Useful information: After closer

Codeigniter Tank_auth session not set

狂风中的少年 提交于 2021-01-29 07:03:37
问题 I have tried all the ways to set the session in the Codeigniter (3.0.6) and Tank Auth (a plug in for Login and Registration). Nothing is working for me. Here is my ci_session table data. Below is my Config file info for the session. $config['sess_driver'] = 'database'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_save_path'] = 'ci_session'; $config['sess_match_ip'] = FALSE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy']

CodeIgniter Subquery in Query Builder

拜拜、爱过 提交于 2021-01-29 06:19:43
问题 Is there a way or can someone translate this to code igniter query builder. SELECT result.id, result.name, result.added FROM (SELECT tbl.id, tbl.name, tbl.date_added FROM table tbl GROUP BY tbl.id) result GROUP BY result.date_added I already have my research(link below) but can't find anything like this(query above). https://www.codeigniter.com/userguide3/database/query_builder.html https://arjunphp.com/how-to-write-subqueries-in-codeigniter-active-record/ And yes, this can be done using

Codeigniter Ajax gets 404 Error

不打扰是莪最后的温柔 提交于 2021-01-28 09:12:59
问题 I wrote an application on my local machine that works perfectly. I am using XAMPP so it is running Apache. When I uploaded the application to my ubuntu test server, I am getting a 404 error on the ajax call and I am honestly perplexed. I am using CodeIgniter 3.1.8. The controller is definitely there and the .htaccess is working fine on my local machine. I checked the case of the filename for the controller and it is fine. Here's the javascript of the ajax call: function step2(){ var canShow =

File upload in codeigniter using ajax

筅森魡賤 提交于 2021-01-28 05:02:11
问题 I am trying to upload file using ajax in codeigniter framework. My code work without using ajax but when i use ajax i got error message 'Undefined index: picture'in if($_FILES['picture']['name']). Please check this code View : <form enctype="multipart/form-data" method="post"> <div class="form-group"> <label for="int">Picture</label> <input type="file" id="picture" name="picture" class="dropify" data-height="300" /> </div> </form> AJAX : var picture=new FormData( $("#picture")[0] ); var url =

What is CI_Controller built_in class? whether it is abstract or not?

匆匆过客 提交于 2021-01-20 09:37:53
问题 I have searched alot that what is CI_Controller class? Actually, it is a base class and all controllers extend from CI_Controller class in codeigniter? Whether, it is abstract class or not? 回答1: in your directory structure open system->core->controller.php you will see the class name is CI_Controller 来源: https://stackoverflow.com/questions/43602164/what-is-ci-controller-built-in-class-whether-it-is-abstract-or-not