CodeIgniter Basic Word integration using docx template files and PHPWord |
[eluser]digitalhuman[/eluser]
Another simpel/basic Word library added for CodeIgniter users. We just use template files, fill it with the data it requires and save it to new file. Simple easy but affective. With thanks to the one who build the PHPWord class CodePlex http://phpword.codeplex.com/releases/view/49543 1. Unpak the whole zip file in your /Application/Libraries folder. 2. Add a template file path to your config.php file: $config['office_templates_path'] = APPPATH . '/../templates'; 3. Copy the Template.docx file to ^ that location 4. Use it as any other library, see the example below: Code: $this->load->library("phpoffice"); More info: http://victorangelier.blogspot.com or twitter: @digital_human
[eluser]heru[/eluser]
hi digitalhuman. i got this error message. what does it mean ? please help.
[eluser]heru[/eluser]
solved. but now it's just showing blank page. why is that ?
[eluser]digitalhuman[/eluser]
I'm sorry, i didn't saw these posts before. Heru, showing a blank page means something went seriously wrong. Turn on error reporting. Like this: error_reporting(E_ALL); ini_set('display_errors', 1); You first post; Please show me the code you have so i can help you out better. I turned on notification now
[eluser]heru[/eluser]
it's okay victor. i turned error reporting like you said, and the result is same, blank page. this is my code : Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]digitalhuman[/eluser]
[quote author="heru" date="1371195116"]it's okay victor. i turned error reporting like you said, and the result is same, blank page. this is my code : Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Well i don't think you have my 'services' modal. So, remove all: services::debug() Can it access the Template.docx file?, Does this path exist: APPPATH . "/../documents/word" on your server?
[eluser]heru[/eluser]
ok, i removed it. anyway, what is "your services modal" ? yes, you mean like this, right ?
[eluser]digitalhuman[/eluser]
Yes idd. But is that directory writable for the webserver?
[eluser]digitalhuman[/eluser]
[quote author="heru" date="1371195943"]ok, i removed it. anyway, what is "your services modal" ? yes, you mean like this, right ? [/quote] Thats my modal with the name 'services' which has a lot of tools and thinks.
[eluser]heru[/eluser]
[quote author="digitalhuman" date="1371196312"]Yes idd. But is that directory writable for the webserver?[/quote] yes, it's writeable. and, still blank page. i don't know what's wrong with my code :-S |
Welcome Guest, Not a member yet? Register Sign In |