about install plugins in my web page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • php.ajay@gmail.com

    about install plugins in my web page

    Hai every body,

    I am working on IELTS project.In that from admin side we are uploading
    pdf files.But how can i down load those pdf files from front end.In my
    system i am having adobe 7.0 version it is working in my system.But
    those who are having version 5 or 6 they are not able to see the pdf
    file.
    This is the code for viewing pdf files.
    <object classid="clsid: CA8A9780-280D-11CF-A24D-444553540000" width=450
    height=601 align="absmiddl e"<param name="SRC" value="../<?=
    $rows['quespdf_path']?>">
    <embed src="../<?=$rows['quespdf_path']?>" width=500 height=601
    align="absmiddl e"<NOEMBEDYo ur browser does not support embedded
    PDF files. </NOEMBED</embed>
    </object>
    The above piece of code is working in my system.But it is not working
    in systems which are having
    lower versions like adobe 5 or 6.
    Please do need ful

    Thanking you
  • macca

    #2
    Re: about install plugins in my web page

    >phow can i down load those pdf files from front end.In my...

    You could force a download...

    <?php


    function force_download( $file)
    {
    $dir = "web_images/";
    if ((isset($file)) &&(file_exists( $dir.$file))) {
    header("Content-type: application/force-download");
    header('Content-Disposition: inline; filename="' . $dir.$file .
    '"');
    header("Content-Transfer-Encoding: Binary");
    header("Content-length: ".filesize($dir .$file));
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename="' . $file .
    '"');
    readfile("$dir$ file");
    } else {
    echo "No file selected";
    } //end if

    }//end function


    ?>

    Comment

    • Jerry Stuckle

      #3
      Re: about install plugins in my web page

      php.ajay@gmail. com wrote:
      Hai every body,
      >
      I am working on IELTS project.In that from admin side we are uploading
      pdf files.But how can i down load those pdf files from front end.In my
      system i am having adobe 7.0 version it is working in my system.But
      those who are having version 5 or 6 they are not able to see the pdf
      file.
      This is the code for viewing pdf files.
      <object classid="clsid: CA8A9780-280D-11CF-A24D-444553540000" width=450
      height=601 align="absmiddl e"<param name="SRC" value="../<?=
      $rows['quespdf_path']?>">
      <embed src="../<?=$rows['quespdf_path']?>" width=500 height=601
      align="absmiddl e"<NOEMBEDYo ur browser does not support embedded
      PDF files. </NOEMBED</embed>
      </object>
      The above piece of code is working in my system.But it is not working
      in systems which are having
      lower versions like adobe 5 or 6.
      Please do need ful
      >
      Thanking you
      >
      This isn't really a PHP question. You'll do better asking in an HTML
      newsgroup such as alt.html. Or an Adobe newsgroup might be even better
      (sorry, I don't frequent any of those).

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • Jerry Stuckle

        #4
        Re: about install plugins in my web page

        macca wrote:
        >phow can i down load those pdf files from front end.In my...
        >
        You could force a download...
        >
        <?php
        >
        >
        function force_download( $file)
        {
        $dir = "web_images/";
        if ((isset($file)) &&(file_exists( $dir.$file))) {
        header("Content-type: application/force-download");
        header('Content-Disposition: inline; filename="' . $dir.$file .
        '"');
        header("Content-Transfer-Encoding: Binary");
        header("Content-length: ".filesize($dir .$file));
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename="' . $file .
        '"');
        readfile("$dir$ file");
        } else {
        echo "No file selected";
        } //end if
        >
        }//end function
        >
        >
        ?>
        >
        >
        This doesn't force a download. The browser is still free to ignore it.

        And it doesn't solve his problem with the object tag not being recognized.

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • NC

          #5
          Re: about install plugins in my web page

          On May 1, 2:31 am, php.a...@gmail. com wrote:
          >
          I am working on IELTS project.In that from admin side we are uploading
          pdf files.But how can i down load those pdf files from front end.In my
          system i am having adobe 7.0 version it is working in my system.But
          those who are having version 5 or 6 they are not able to see the pdf
          file.
          This is the code for viewing pdf files.
          <object classid="clsid: CA8A9780-280D-11CF-A24D-444553540000" width=450
          height=601 align="absmiddl e"<param name="SRC" value="../<?=
          $rows['quespdf_path']?>">
          <embed src="../<?=$rows['quespdf_path']?>" width=500 height=601
          align="absmiddl e"<NOEMBEDYo ur browser does not support embedded
          PDF files. </NOEMBED</embed>
          </object>
          Try an iframe instead:

          <iframe width=450 height=601 src="../<?= $rows['quespdf_path']?>">

          Cheers,
          NC

          Comment

          Working...