Click here to Skip to main content
15,880,972 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require_once dirname(__FILE__) . '/tcpdf/tcpdf.php';

class Pdf extends TCPDF
{
    function __construct()
    {
        parent::__construct();
    }
}


What I have tried:

A PHP Error was encountered
Severity: Warning

Message: require_once(C:\xampp\htdocs\OnlineExaminationCI\application\libraries/tcpdf/tcpdf.php): failed to open stream: No such file or directory

Filename: libraries/Pdf.php

Line Number: 3

Backtrace:

File: C:\xampp\htdocs\OnlineExaminationCI\application\libraries\Pdf.php
Line: 3
Function: _error_handler

File: C:\xampp\htdocs\OnlineExaminationCI\application\libraries\Pdf.php
Line: 3
Function: require_once

File: C:\xampp\htdocs\OnlineExaminationCI\application\controllers\Hasilujian.php
Line: 73
Function: library

File: C:\xampp\htdocs\OnlineExaminationCI\index.php
Line: 315
Function: require_once


Fatal error: require_once(): Failed opening required 'C:\xampp\htdocs\OnlineExaminationCI\application\libraries/tcpdf/tcpdf.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\OnlineExaminationCI\application\libraries\Pdf.php on line 3
A PHP Error was encountered
Severity: Compile Error

Message: require_once(): Failed opening required 'C:\xampp\htdocs\OnlineExaminationCI\application\libraries/tcpdf/tcpdf.php' (include_path='C:\xampp\php\PEAR')

Filename: libraries/Pdf.php

Line Number: 3

Backtrace:
Posted
Updated 28-Nov-22 19:15pm

1 solution

Read the error message, it couldn't be much clearer:
failed to open stream: No such file or directory

It cannot find a file of that name in that location.

So start by manually following that path on your server and checking if the file exists. It it doesn't, then find out where it is ...
If it does and you can read it, then check access permission all the way down the tree: IIS doesn't run under the same user as you so the whole folder path and the file itself need access to be granted to pretty much all users.

We can't do any of that for you ...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900