0
I’m creating a budget page with Zend 2, to print with FPDF.
The problem is I don’t know how to import.
That is the mistake:
Warning: require(/php/sistema_real/public/aditivos/fpdf/fpdf.php) [Function.require]: failed to open stream: No such file or directory in C: xampp htdocs php sistema_real application views scripts orcamento imprimir.phtml on line 4
Fatal error: require() [Function.require]: Failed Opening required '/php/system_real/public/additives/fpdf/fpdf.php' (include_path='C: xampp htdocs php system_real application/./library;C: xampp htdocs php system_real library;.; xampp php PEAR') in C: xampp htdocs php sistema_real application views scripts orcamento print.phtml on line 4
The chunk of the code that does require:
<?php
$end = $this->baseUrl('aditivos/fpdf/');
require($end.'fpdf.php');
Here the excerpt from the Controller:
public function imprimirAction()
{
$this->_helper->layout->disableLayout();
}
No such file or directory
~ "no file or folder exists", summarizing the fpdf.php file does not exist in the folder, or the fpdf folder is not inside the additive folder, it is also possible that the additive folder is missing some letter or more.– Guilherme Nascimento
But the address is right... the document is there: C: xampp htdocs php system_real public aditivos fpdf
– Mikhail Gorbachev
and fpdf.php is there?
– Guilherme Nascimento
Yes yes, I’ve checked several times hehe
– Mikhail Gorbachev
<?php $end = $this->baseUrl('additives/fpdf/'); require($end. 'fpdf.php');
– Mikhail Gorbachev
It is to edit the question -.- ... Put the relevant code, I do not know what this is
baseUrl
friend. As far as I know this is not native to PHP, I am waiting.– Guilherme Nascimento
Yes, this baseUrl is from Zendframework 2
– Mikhail Gorbachev
I updated the answer, I didn’t know about the
APPLICATION_PATH
, see if this makes it easier.– Guilherme Nascimento
Thank you very Much Guilherme! It’s working here with the solution before the edition, I’m already going to test the other.
– Mikhail Gorbachev