Major - Header problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rohini
    New Member
    • Dec 2006
    • 3

    Major - Header problem

    Dear friends,
    In the popup window i am using the header for downloading the files.
    I call the popup window in one directory say for example:
    /sample/download/popup.php
    In the popup.php i call the function
    window.open('../export/export.php');

    In the export.php i am using the form action as export_type.php .
    In the export_type.php i includes some file . In that one file contains the function for downloading.

    If i am using like this my download program is not working what is the
    problem here.
    If i am using all the files in the same directory then my header is working.
    Kindly anyone can address my problem.


    With Regards
    Deepthi
  • kovik
    Recognized Expert Top Contributor
    • Jun 2007
    • 1044

    #2
    Where do headers come into this...?

    Could you be more clear about what you are trying to do?

    Comment

    • rohini
      New Member
      • Dec 2006
      • 3

      #3
      Hello sir,

      I am using the headers for downloading.
      I explain the problem in detailed.
      *************** *************** *************** *************** *****
      => The file rohini/sample/popup/popup_window.ph p file call one popup window.
      => Inside this file file i call the window like this.
      button5.onClick = "function () {
      window.open( '../quality/src/qm_export_frame .php');
      }\n";
      *************** *************** *************** *************** ******
      => In the ../quality/src/qm_export_frame .php i am include the files
      Inside the ../quality/src/qm_export_frame .php file
      * I am using the form
      <form name=test method=post action="qm_type _export.php">
      And also i am having one hidden box here.
      * Whenever the form is submitted it calls the file
      qm_type_export. php
      qm_type_export. php includes some more files
      * qm_type_export. php file contains
      include("export ing_functions.p hp");
      * So i get the value from the hidden box .
      * Say if the hidden box value contains one then i call the function
      known as call_export().
      * The call_export() function is available in the file
      exporting_funct ions.php.
      * Inside the call_export() function i am calling the function
      call_mime(type) .
      *************** *************** *************** *************** ******
      function call_mime($titl e)
      {
      header('Content-Type: text/css');
      header("Content-length: ".filesize($tit le));
      header('Content-disposition: attachment; filename="abcde .csv"');
      readfile($title );
      }
      *************** *************** *************** *************** ******


      So this is my infrastructure of the program.
      My problem if i call the call_mime($titl e). It does not work.

      But if i am calling the window and all the files related to the same
      directory then it is working.

      This is my problem.

      With Regards,
      Rohini A.M

      Comment

      Working...