codeigniter

Can 2 .htaccess files block URL rewriting

人走茶凉 提交于 2020-01-26 04:18:08
问题 I have a codeigniter project inside the b1 folder in my public_html folder: mydomain.com/b1/controller/function I want to change it to: mydomain.com/controller/function in the browser bar using a 301 redirect. My .htaccess file in my public_html has: RewriteEngine on RewriteRule ^b1/(.*)$ /$1 [R=301,L,NC] RewriteRule ^(.*)$ b1/$1 EXPLANATION: RewriteRule ^b1/(.*)$ /$1 [R=301,L,NC] # THIS IS TO REWRITE ALL REQUESTS FROM THE NAVBAR IN MY PROJECT WHICH HAVE THE FORM mydomain.com/b1/controller

How to insert 1 image in 2 different directories using codeigniter

安稳与你 提交于 2020-01-26 03:50:07
问题 I am trying to insert 1 image in 2 different directories but it is saving only in the first directory but not in the second directory.I am unable find the mistake in my code,please check the below code and help us.Thanks in advance. public function image() { $data = array(); $error = array(); $config1=array( 'upload_path'=>'upload/', 'allowed_types'=>'jpg|jpeg|png|bmp', 'max_size'=>0, 'filename'=>url_title($this->input->post('file')) ); $this->load->library('upload',$config1); if($this-

How can I create a CRUD with Codeigniter using SQLite?

ⅰ亾dé卋堺 提交于 2020-01-25 22:09:41
问题 I'm starting a new project where I want to use Codeigniter with SQLite. I searched information about this and I managed to conect and get data from my SQLite database but I have no idea of how can I create a CRUD for a table with this, I'm trying to do it the same way I did in the past with MySQL buy it is not working. Here is what I did: config/database.php $db['default'] = array( 'dsn' => '', 'hostname' => '', 'username' => '', 'password' => '', 'database' => APPPATH.'/database/Pasapalabra

How can I create a CRUD with Codeigniter using SQLite?

北慕城南 提交于 2020-01-25 22:06:19
问题 I'm starting a new project where I want to use Codeigniter with SQLite. I searched information about this and I managed to conect and get data from my SQLite database but I have no idea of how can I create a CRUD for a table with this, I'm trying to do it the same way I did in the past with MySQL buy it is not working. Here is what I did: config/database.php $db['default'] = array( 'dsn' => '', 'hostname' => '', 'username' => '', 'password' => '', 'database' => APPPATH.'/database/Pasapalabra

CodeIgniter Extended Core Controller

和自甴很熟 提交于 2020-01-25 21:32:07
问题 I'm stumped on this one. With my CodeIgniter application set up on a WAMP server locally, everything is fine. All of my classes extend my controller (MY_Controller) However, when the application is on the live environment which is Linux based, it throws an error that the MY_Controller class doesn't exist. Have I forgot about a configuration variable somewhere or something like that with a path to the application/core folder? I've looked for other threads with the same issue across Google,

PHP mail use FROM of multiple mail client (Yahoo | Google | Hotmail | Rediff | Personal Mail domain)

淺唱寂寞╮ 提交于 2020-01-25 19:00:10
问题 Currently I'm Using PHP mail function Or CodeIgnitor mail function to send mail. From mail id can be of any domain , example xyz@gmail.com, xyz@yahoo.com, xyz@hotmail.com Also To mail can be of any domain. My mails are sent proper when FROM is set to any mail other than that of YAHOO. Having trouble to send mail from PHP mail FROM any mail of YAHOO. Is yahoo blocking my mails ? How can I solve this problem ? 回答1: You cannot send mail successfully on behalf of the domains stated above using

Restrict browser access to directory files

我是研究僧i 提交于 2020-01-25 18:43:27
问题 In my website, i want to restrict viewing certain files which are stored in a directory called "/content" such that only logged in users can view the files as it stands right now anyone who types in xxxxxxx.com/content/4dc32b1c0a630.png into the browser can see this image file I've added Options -Indexes to my .htaccess file but that didn't do anything if it is helpful my site is built using codeigniter, so a PHP solution would be great, though I'd take any advice you might have! thank you,

PHP Mail Function waits and not working with foreach loop

五迷三道 提交于 2020-01-25 14:59:43
问题 I am trying to send mail to all users that have no created reports in one month, also trying to send mail to this users with foreach loop and with mail function, when i refresh one by one then it sends mail one by one, then it works. i want to send mail to all this users in one time. $from = "xxx@xxx.com"; $subject = ""; $headers = ""; $inc = 0; foreach($query->result_array() as $row) { $inc++; $to = $row['us_email']; $to_date = $row['report_date']; if($to_date != "0000-00-00") { $subject =

PHP Mail Function waits and not working with foreach loop

感情迁移 提交于 2020-01-25 14:58:13
问题 I am trying to send mail to all users that have no created reports in one month, also trying to send mail to this users with foreach loop and with mail function, when i refresh one by one then it sends mail one by one, then it works. i want to send mail to all this users in one time. $from = "xxx@xxx.com"; $subject = ""; $headers = ""; $inc = 0; foreach($query->result_array() as $row) { $inc++; $to = $row['us_email']; $to_date = $row['report_date']; if($to_date != "0000-00-00") { $subject =

PHP Mail Function waits and not working with foreach loop

孤街浪徒 提交于 2020-01-25 14:54:28
问题 I am trying to send mail to all users that have no created reports in one month, also trying to send mail to this users with foreach loop and with mail function, when i refresh one by one then it sends mail one by one, then it works. i want to send mail to all this users in one time. $from = "xxx@xxx.com"; $subject = ""; $headers = ""; $inc = 0; foreach($query->result_array() as $row) { $inc++; $to = $row['us_email']; $to_date = $row['report_date']; if($to_date != "0000-00-00") { $subject =