Jump to content

divyakrishnan

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

divyakrishnan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi.. I have an issue on my project.I want to open a particular page of a PDF file by clicking a hyper link.How should I do it?any idea ? I used the following code <?php header("Content-Type: application/pdf"); $pdfFile="readme.pdf#page=10"; ?> <html> <head> <title>Untitled Document</title> </head> <body> <a href="http://<?php echo $pdfFile; ?>">Click Here</a> </body> </html> But it showing an alert like following File does not begin with '%PDF-' After clicking alert showing a black screen.. can u please send me the entire code? Thanks...
  2. Hi.. I want to use the pear package.Pear is already on my xampp package.On the file php.ini the pear is included(I didn't change the file php.ini..there is a line like include_path = ".;C:\xampp\php\pear\" .I used the following code to retrieve the results from database..But it is not working .. <?php PHP Syntax // Include the appropriate PEAR classes require_once("DB.php"); $dsn = array( 'phptype' => 'mysql', 'hostspec' => 'localhost', 'database' => 'emp', 'username' => 'root', 'password' => 'mysql' ); $dbh = DB::connect($dsn); $stmt = "SELECT id, name FROM examples ORDER BY id"; $result = $dbh->simpleQuery($stmt, DB_FETCHMODE_ASSOC); if ($dbh->numRows($result) > 0) { $data = (object) $dbh->fetchRow($result, DB_FETCHMODE_ASSOC); echo "id => $data->id<br>\n"; echo "name => $data->name<br>\n"; } ?> showing the errors like following ... Warning: require_once(DB.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\divya\Pear-examples\dbconnect.php on line 3 Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\divya\Pear-examples\dbconnect.php on line 3 What should I do..Shall I install the Pear package se-perately?How should I configure it?Plz Help me.....
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.