Jump to content

Not adding in theme into file path


Xtremer360

Recommended Posts

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();
}

Link to comment
https://forums.phpfreaks.com/topic/267775-not-adding-in-theme-into-file-path/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.