codeigniter-3

CodeIgniter project loads nothing on the localhost browser

泪湿孤枕 提交于 2020-01-03 04:58:05
问题 I am a complete beginner in CodeIgniter and have been following some videos and CI docs to get started. I did as these resources said, I added the .htaccess file as the videos said. This is the file. RewriteEngine on RewriteBase /ciBlog/ RewriteCond $1 !^(index\.php|asstes|js|css|uploads|favicon.png) RewriteCond %(REQUEST_FILENAME) !-f RewriteCond %(REQUEST_FILENAME) !-d RewriteRule ^(.*)$ ./index.php/$1 [L] I set the base_url to localhost/ciBlog , tried the localhost/ciBlog/ as well. index

How to change the extension in view using codeigniter 3?

强颜欢笑 提交于 2020-01-03 03:18:08
问题 Here's my problem I setup Codeigniter 3 in my local and use an thirdparty (MX thing) now that I have adjusted the file path, I wanted to change the file extension that is being fetch the controller. $this->load->view('welcome_message'); I change the file in views from: welcome_message.php to this welcome_message.html Now I get this error An Error Was Encountered Unable to load the requested file: welcome_message.php but I wanted to use the .html extension becuase the folder path that I will

CodeIgniter3 - supporting both API & Web requests in Controllers?

偶尔善良 提交于 2020-01-02 09:59:55
问题 I'm currently working with a CodeIgniter3 application, and have built the basis for a standard blog-like system. The structure is standard CI - User requests a page, page loads controller method, controller method calls any relevant DB functions from its model, and then a view is loaded. However, I'm looking to also make this view accessible via an API. So, instead of the $data array being filled with information to populate into HTML, I would instead pass it to a different view which would

Unable to send email using SMTP gmail config in codeigniter 3

空扰寡人 提交于 2020-01-02 05:47:08
问题 Below are my code and I refer all examples in stack overflow and codeigniter user guide. still I unable to solve this public function send() { $config['protocol'] = 'smtp'; $config['smtp_crypto'] = 'ssl'; $config['smtp_host'] = 'smtp.gmail.com'; $config['smtp_port'] = '465'; $config['smtp_user'] = '**********@gmail.com'; $config['smtp_pass'] = '********'; $config['mailtype'] = 'html'; $config['charset'] = 'utf-8'; $config['newline'] = "\r\n"; $config['wordwrap'] = TRUE; $config['smtp_timeout'

Get UnCommitted Data in MySQL

感情迁移 提交于 2020-01-01 01:24:31
问题 In SQL Server we can write below SQL Queries to get Un-Committed data in database . This means the data that is still under transaction and Transaction is not complete. SQL Server Query Select * from TableName With(NoLock); Is there any equivalence in MySQL database to get data even if table is locked ? I am trying this in PHP CodeIgnitor 回答1: Found an article with title " MySQL NOLOCK syntax " http://itecsoftware.com/with-nolock-table-hint-equivalent-for-mysql SQL Server WITH (NOLOCK) looks

creating a core class that extends another core class codeigniter [duplicate]

こ雲淡風輕ζ 提交于 2019-12-29 08:23:42
问题 This question already has answers here : Codeigniter extending extended MY_Controller (5 answers) Closed 5 years ago . class Settings extends USER_Controller {...} class USER_Controller extends MY_Controller {...}//limit access to user and define some params and functions that is user depended class MY_Controller extends CI_Controller {...}//provide extra functionality accross all controllers well if i try to create above 3 class's this will not work. yet if i just use settings extends MY

I want to convert this query in codeigniter to Ignited datatable query

不想你离开。 提交于 2019-12-29 01:53:10
问题 I dont know how to convert this long model function to ignited datatable query. I have done small select functions with ignited datatables.Anybody know??? I have no idea about how to covert it. Is there any functions to do it? public function fetch_data() { $this->db->from('jil_requirements'); $this->db->join('jil_users', 'jil_requirements.rqm_userid=jil_users.usr_id', 'left'); $this->db->join('jil_merchants', 'jil_requirements.rqm_createdempid=jil_merchants.mer_id', 'left'); $this->db->where

PHP Codeigniter Unexpected Error(Module 'imagick' already loaded)

大城市里の小女人 提交于 2019-12-27 03:36:42
问题 I am using PHP Codeigniter and unexpectedly this error is occur on live server. Can any one help. Severity: Core Warning Message: Module 'imagick' already loaded Filename: Unknown Line Number: 0 回答1: That is from php loading up. In your university files there are 2 Lines loading the imagick extension Assuming a Linux server it's likely located /etc/php/conf.d or similar. Ubuntu server uses /etc/php7/apache/conf.d for example assuming your using php as an Apache module Inside there you should

PHP Codeigniter Unexpected Error(Module 'imagick' already loaded)

拈花ヽ惹草 提交于 2019-12-27 03:33:30
问题 I am using PHP Codeigniter and unexpectedly this error is occur on live server. Can any one help. Severity: Core Warning Message: Module 'imagick' already loaded Filename: Unknown Line Number: 0 回答1: That is from php loading up. In your university files there are 2 Lines loading the imagick extension Assuming a Linux server it's likely located /etc/php/conf.d or similar. Ubuntu server uses /etc/php7/apache/conf.d for example assuming your using php as an Apache module Inside there you should

Displaying marker with latlong json data in Biostall-google-maps-V3 API Library issue

末鹿安然 提交于 2019-12-25 18:50:20
问题 i have a simple AJAX that will get all data from MYSQL with my controller then display all data with its latitude and longitude when searched: $(document).ready(function () { $("#searchDataToMarker").keyup(function () { var value = $(this).val(); $.ajax({ type: "POST", url: "<?php echo base_url('Maps/mapSearchDataInMarker') ?>", data: { 'searchDataToMarker': value }, dataType: "JSON", success: function (searchMapDataResult) { if (searchMapDataResult.length !== null || $('searchDataToMarker')