Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7025755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:01:14+00:00 2026-05-28T00:01:14+00:00

I am using PHP code for creating .pdf file and I am filing forms

  • 0

I am using PHP code for creating .pdf file and I am filing forms values in that .pdf file.

On localhost the code is working fine it creates .pdf ,edit .pdf file ….
But when i am putting same code on another server it’s not creating .pdf and edit to……

the code is-

<?php
date_default_timezone_set('UTC');
require('fpdf/fpdf.php');

class PDF_result extends FPDF {
    function __construct ($orientation = 'P', $unit = 'pt', $format = 'Letter', $margin = 5 ) {
        $this->FPDF($orientation, $unit, $format);
        $this->SetTopMargin($margin);
        $this->SetLeftMargin($margin);
        $this->SetRightMargin($margin);
        //$this->SetRightMargin1($margin1);
        $this->SetAutoPageBreak(true, $margin);
    }

    function Header () {
        //$this->SetLeftMargin(85);
        $this->SetLeftMargin(5);
         $this->Image('header3.jpg',25,15,560);
         $this->SetLeftMargin(25);
    //  $this->SetFont('Arial', 'B', 20);
    //  $this->SetFillColor(36, 96, 84);
    //  $this->SetTextColor(225);
    //  $this->Cell(0, 30, "YouHack MCQ Results", 0, 1, 'C', true);
    }

 function Footer()
{
    //Position at 1.5 cm from bottom
    $this->SetY(-15);
    //Arial italic 8
    $this->SetFont('Arial','I',8);
    //Page number
    $this->Cell(0,10,'ifs , india',0,0,'C');
}


function Generate_Table($subjects, $marks) {
    $this->SetFont('Arial', 'B', 12);
    $this->SetTextColor(0);
//  $this->SetFillColor(94, 188, z);
$this->SetFillColor(94, 188, 225);
    $this->SetLineWidth(1);
    $this->Cell(427, 25, "Subjects", 'LTR', 0, 'C', true);
    $this->Cell(100, 25, "Marks", 'LTR', 1, 'C', true);

    $this->SetFont('Arial', '');
    $this->SetFillColor(238);
    $this->SetLineWidth(0.2);
    $fill = false;

    for ($i = 0; $i < count($subjects); $i++) {
        $this->Cell(427, 20, $subjects[$i], 1, 0, 'L', $fill);
        $this->Cell(100, 20,  $marks[$i], 1, 1, 'R', $fill);
        $fill = !$fill;
    }
    $this->SetX(367);
    //$this->Cell(100, 20, "Total", 1);
//  $this->Cell(100, 20,  array_sum($marks), 1, 1, 'R');
}

}

(its not complete code)

What is the exact problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:01:14+00:00Added an answer on May 28, 2026 at 12:01 am

    If this code is working on localhost, maybe it’s a permission problem on your server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using this php code: exec(unrar e file.rar,$ret,$code); and getting an error code
I am creating code to upload images in a folder using PHP, & before
I'm creating my own template engine using PHP. The basic idea is that for
I am creating a file tree using PHP & jQuery, but I'm having trouble
I'm having trouble creating multiple xml requests using php's curl_multi_exec. The problem is that
I am creating an XML file from scratch using PHP's SimpleXML Object. But I
I'm loading a Flex 4.5 module (it's a SWF file) using a PHP code
I am using php code to query to a database and the results will
I am using following PHP code to connect to MS Access database: $odb_conn =
I am using this PHP code: if (isset($_GET['c'])) { $pages = array(home, upload, signup);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.