Welcome Guest, Not a member yet? Register   Sign In
Issue accessing file in helper
#1

[eluser]jsuissa[/eluser]
I'm trying to make a helper to create PDFs using Html2ps/Html2pdf and I'm getting an error that says the file html2ps.config can't be found. However, it's there. The two files above it in my code sample, that are in the same folder, both load just fine.

Wondering if this has to with Codeigntier's file structure? Since it's being called as part of a command, not require_once, would that change how it should be referenced?

The html2pdf subfolder is located in the system/helpers folder.

Thanks in advance for any help on this.


Error Message:

Message: file_get_contents() [function.file-get-contents]: Unable to access html2pdf/html2ps.config
Filename: html2pdf/config.parse.php



Code:
require_once('html2pdf/config.inc.php');
require_once('html2pdf/pipeline.factory.class.php');

parse_config_file('html2pdf/html2ps.config');
#2

[eluser]InsiteFX[/eluser]
Look at the .htaccess file that CI puts into each directory.
#3

[eluser]jsuissa[/eluser]
Thanks so much. I see the "Deny From All" in both system and application directories.

So if I wanted to create a helper and it needed to call files is it not possible to do that within either of those directories? Is there a best practices approach for something like this?
#4

[eluser]InsiteFX[/eluser]
Create an assets directory for all you uploads css js etc and make it writeable




Theme © iAndrew 2016 - Forum software by © MyBB