summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/libraries')
-rw-r--r--user_guide_src/source/libraries/email.rst20
-rw-r--r--user_guide_src/source/libraries/file_uploading.rst16
-rw-r--r--user_guide_src/source/libraries/form_validation.rst4
-rw-r--r--user_guide_src/source/libraries/output.rst9
-rw-r--r--user_guide_src/source/libraries/xmlrpc.rst28
5 files changed, 49 insertions, 28 deletions
diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst
index 27b704dae..daf000907 100644
--- a/user_guide_src/source/libraries/email.rst
+++ b/user_guide_src/source/libraries/email.rst
@@ -104,6 +104,7 @@ Preference Default Value Options Descript
**newline** \\n "\\r\\n" or "\\n" or "\\r" Newline character. (Use "\\r\\n" to comply with RFC 822).
**bcc_batch_mode** FALSE TRUE or FALSE (boolean) Enable BCC Batch Mode.
**bcc_batch_size** 200 None Number of emails in each BCC batch.
+**dsn** FALSE TRUE or FALSE (boolean) Enable notify message from server
=================== ====================== ============================ =======================================================================
Email Function Reference
@@ -228,11 +229,20 @@ use the function multiple times. For example::
$this->email->attach('/path/to/photo2.jpg');
$this->email->attach('/path/to/photo3.jpg');
-If you'd like to change the disposition or add a custom file name, you can use the second and third paramaters. To use the default disposition (attachment), leave the second parameter blank. Here's an example::
-
- $this->email->attach('/path/to/photo1.jpg', 'inline');
- $this->email->attach('/path/to/photo1.jpg', '', 'birthday.jpg');
-
+To use the default disposition (attachment), leave the second parameter blank,
+otherwise use a custom disposition::
+
+ $this->email->attach('image.jpg', 'inline');
+
+If you'd like to use a custom file name, you can use the third paramater::
+
+ $this->email->attach('filename.pdf', 'attachment', 'report.pdf');
+
+If you need to use a buffer string instead of a real - physical - file you can
+use the first parameter as buffer, the third parameter as file name and the fourth
+parameter as mime-type::
+
+ $this->email->attach($buffer, 'attachment', 'report.pdf', 'application/pdf');
$this->email->print_debugger()
-------------------------------
diff --git a/user_guide_src/source/libraries/file_uploading.rst b/user_guide_src/source/libraries/file_uploading.rst
index 90efca95d..d573fc770 100644
--- a/user_guide_src/source/libraries/file_uploading.rst
+++ b/user_guide_src/source/libraries/file_uploading.rst
@@ -90,24 +90,24 @@ this code and save it to your applications/controllers/ folder::
class Upload extends CI_Controller {
- function __construct()
+ public function __construct()
{
parent::__construct();
$this->load->helper(array('form', 'url'));
}
- function index()
+ public function index()
{
$this->load->view('upload_form', array('error' => ' ' ));
}
- function do_upload()
+ public function do_upload()
{
- $config['upload_path'] = './uploads/';
- $config['allowed_types'] = 'gif|jpg|png';
- $config['max_size'] = '100';
- $config['max_width'] = '1024';
- $config['max_height'] = '768';
+ $config['upload_path'] = './uploads/';
+ $config['allowed_types'] = 'gif|jpg|png';
+ $config['max_size'] = 100;
+ $config['max_width'] = 1024;
+ $config['max_height'] = 768;
$this->load->library('upload', $config);
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index e819a9d70..ef4be5601 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -123,7 +123,7 @@ this code and save it to your applications/controllers/ folder::
class Form extends CI_Controller {
- function index()
+ public function index()
{
$this->load->helper(array('form', 'url'));
@@ -219,7 +219,7 @@ Your controller should now look like this::
class Form extends CI_Controller {
- function index()
+ public function index()
{
$this->load->helper(array('form', 'url'));
diff --git a/user_guide_src/source/libraries/output.rst b/user_guide_src/source/libraries/output.rst
index 2cf7c0854..baceaae7b 100644
--- a/user_guide_src/source/libraries/output.rst
+++ b/user_guide_src/source/libraries/output.rst
@@ -49,6 +49,15 @@ data, JPEG's, XML, etc easily.
.. important:: Make sure any non-mime string you pass to this method
exists in config/mimes.php or it will have no effect.
+$this->output->get_content_type();
+==========================================
+
+Returns the Content-Type HTTP header that's currently in use.
+
+ $mime = $this->output->get_content_type();
+
+.. note:: If not set, the default return value is 'text/html'.
+
$this->output->get_output();
=============================
diff --git a/user_guide_src/source/libraries/xmlrpc.rst b/user_guide_src/source/libraries/xmlrpc.rst
index 3b945769f..dfb88114e 100644
--- a/user_guide_src/source/libraries/xmlrpc.rst
+++ b/user_guide_src/source/libraries/xmlrpc.rst
@@ -184,10 +184,10 @@ server will expect a class to exist with this prototype::
class My_blog extends CI_Controller {
- function new_post($request)
- {
+ public function new_post($request)
+ {
- }
+ }
}
The $request variable is an object compiled by the Server, which
@@ -304,7 +304,7 @@ folder::
class Xmlrpc_client extends CI_Controller {
- function index()
+ public function index()
{
$this->load->helper('url');
$server_url = site_url('xmlrpc_server');
@@ -345,7 +345,7 @@ folder::
class Xmlrpc_server extends CI_Controller {
- function index()
+ public function index()
{
$this->load->library('xmlrpc');
$this->load->library('xmlrpcs');
@@ -357,15 +357,17 @@ folder::
}
- function process($request)
+ public function process($request)
{
$parameters = $request->output_parameters();
$response = array(
- array(
- 'you_said' => $parameters['0'],
- 'i_respond' => 'Not bad at all.'),
- 'struct');
+ array(
+ 'you_said' => $parameters[0],
+ 'i_respond' => 'Not bad at all.'
+ ),
+ 'struct'
+ );
return $this->xmlrpc->send_response($response);
}
@@ -419,9 +421,9 @@ the Server.
::
$parameters = $request->output_parameters();
- $name = $parameters['0']['name'];
- $size = $parameters['1']['size'];
- $size = $parameters['1']['shape'];
+ $name = $parameters[0]['name'];
+ $size = $parameters[1]['size'];
+ $size = $parameters[1]['shape'];
**************************
XML-RPC Function Reference