Xtremer360 Posted August 29, 2012 Share Posted August 29, 2012 Trying to figure out why my config items are not getting put into the view file. It says <p>Unable to load the requested file: //email/registration-html.php</p></div>. It echos those values everywhere else. site_config.php /* TEMPLATE SETTINGS */ $config['themes_path'] = 'themes'; $config['default_theme'] = 'peach'; register.php $this->functions_model->send_email('registration', $post_email_address, $this->data); s functions model.php /** * Send email message of given type (activate, forgot_password, etc.) * * @param string $email_type * @param string $email_address * @param array $data * @return void */ function send_email($email_type, $email_address, $data) { var_dump($this->config->item('themes_path', 'site_config')); var_dump($this->config->item('default_theme', 'site_config')); $this->email->from($this->config->item('site_email', 'site_config'), $this->config->item('site_title', 'site_config')); $this->email->reply_to($this->config->item('site_email', 'site_config'), $this->config->item('site_title', 'site_config')); $this->email->to($email_address); $this->email->subject(sprintf($this->config->item($email_type.'_subject', 'site_config'), $this->config->item('site_title', 'site_config'))); $this->email->message($this->load->view($this->config->item('themes_path', 'site_config').'/'.$this->config->item('default_theme', 'site_config').'/email/'.$email_type.'-html', $data, TRUE)); $this->email->set_alt_message($this->load->view($this->load->view($this->config->item('themes_path', 'site_config').'/'.$this->config->item('default_theme', 'site_config').'/email/'.$email_type.'-txt', $data, TRUE))); $this->email->send(); } Quote Link to comment https://forums.phpfreaks.com/topic/267775-not-adding-in-theme-into-file-path/ Share on other sites More sharing options...
MMDE Posted August 29, 2012 Share Posted August 29, 2012 Are you sure the file path it tries to load from is correct? Try to print it to the screen where you use it and it doesn't work, because it might be your script doesn't find the files you're looking for, because the path doesn't work from where the script is run. Quote Link to comment https://forums.phpfreaks.com/topic/267775-not-adding-in-theme-into-file-path/#findComment-1373695 Share on other sites More sharing options...
Xtremer360 Posted August 29, 2012 Author Share Posted August 29, 2012 Right. Quote Link to comment https://forums.phpfreaks.com/topic/267775-not-adding-in-theme-into-file-path/#findComment-1373696 Share on other sites More sharing options...
Xtremer360 Posted August 30, 2012 Author Share Posted August 30, 2012 Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/267775-not-adding-in-theme-into-file-path/#findComment-1373744 Share on other sites More sharing options...
Xtremer360 Posted August 30, 2012 Author Share Posted August 30, 2012 *bump* Quote Link to comment https://forums.phpfreaks.com/topic/267775-not-adding-in-theme-into-file-path/#findComment-1373918 Share on other sites More sharing options...
Xtremer360 Posted August 30, 2012 Author Share Posted August 30, 2012 Should have removed the site_config from the second parameter as its not an array. Quote Link to comment https://forums.phpfreaks.com/topic/267775-not-adding-in-theme-into-file-path/#findComment-1373975 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.