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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.