PDA

View Full Version : Can't see File_PDF in php script



timbolex
05-17-2011, 07:21 AM
I have installed The PEAR package called "File_PDF". When I run a php script called "Test_PDF.php" with following code :

require_once('File/PDF.php');

I get the following error :

Warning: require_once(File/PDF.php) [function.require-once]: failed to open stream: No such file or directory in /home2/mysitename/public_html/beta/Test_PDF.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'File/PDF.php' (include_path='.:/usr/lib64/php:/usr/lib/php') in /home2/mysitename/public_html/beta/Test_PDF.php on line 2

I can see the "File" folder inside the "php" folder, and I can see the "PDF.php" file. What do I need to do to allow my script to see it.

One note: my php script is located in a sub-folder of "public_html" called "beta".

Thanks

felgall
05-17-2011, 12:27 PM
Add the path from the beta folder to the file folder to the front of the File/PDF.php