how to install phpjasperxml in codeigniter |
[eluser]Unknown[/eluser]
hi... i've phpjasperxml class (http://www.simit.com.my/?q=phpjasperxml) this class is convert xml(created by ireport) to fpdf. i'm new in codeigniter,i dont know how to insert this class in codeigniter... need help please.. ..sorry for my bad english ^_^... thx
[eluser]pistolPete[/eluser]
Have a look at user_guide/general/creating_libraries.html. Copy PHPJasperXML.inc to application/libraries. Rename the file to PHPJasperXML.php. Copy the folder fpdf to application/libraries. Insert the following line to PHPJasperXML.php after the <?php tag: Code: include_once('./fpdf/FPDF.php'); You should now be able to load the library in your controller using Code: $this->load->library('PHPJasperXML');
[eluser]sramos[/eluser]
Im also using the PHPJasperXML0.7a, but ive noticed that when generating the report i get lots of notices. I put the @ before the PHPJasperXML class calls and it works fine. I dont think its totally sweet to silence the errors, so anybody had corrected the PHPJasperXML class?? It has a lot of details that generates the notices. This is my not honey moon solution: Code: <?php
[eluser]danmontgomery[/eluser]
@ is a very resource-intensive solution. Errors can and should be silenced in a production environment.
[eluser]sramos[/eluser]
[quote author="noctrum" date="1278456476"]@ is a very resource-intensive solution. Errors can and should be silenced in a production environment.[/quote] Thanks!, I normally like to pray and use a try-catch block for errors. I log them and propagate depending on the application layer the error occurs. Even for the fatal errors i like to use the strategy described on this post: http://ellislab.com/forums/viewthread/97198/#492446 what i do is also to log them, and put a not bleeding output. Ive seen that when you use @ you do a total silence, and i want to still log for errors.
[eluser]dunialebah[/eluser]
$xml = simplexml_load_file("report/chathuReport.jasper"); I have error from that, this is the error Message: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "report/chathuReport.jasper" What I have to do?
[eluser]dunialebah[/eluser]
thanks CroNix, but I get this error Message: simplexml_load_file() [function.simplexml-load-file]: report/report1.jasper:1: parser error : Start tag expected, '<' not found
[eluser]dunialebah[/eluser]
Code: $this->load->library('PHPJasperXML'); That's my code but I got small blank pdf file without file name |
Welcome Guest, Not a member yet? Register Sign In |