dont write help as a question heading.try to type meaning full question
Parts or all of this you might find useful
<?php $path = 'test.doc'; if ( !is_file( $path ) ) exit; $file = file_get_contents( $path ); header( 'Content-Type: application/msword' ); header( 'Content-Length: '.filesize( $path ) ); header( 'Content-Transfer-Encoding: binary' ); header( 'Content-Description: File Transfer' ); header( 'Content-Disposition: attachment; filename='.basename( $path ) ); print $file; ?>
You can learn more at the PHP website documentation under the search "header"
Thanks for your reply..........
consider that my variable $test contains the db content then please tell me how use this code.
Since you have your doc data as a variable already you can skip the file_get_contents part and drop the Content-Length header since it's only a courtesy for the browser anyway and give the doc a name ...
<?php $doc_name = 'mydoc.doc'; header( 'Content-Type: application/msword' ); header( 'Content-Transfer-Encoding: binary' ); header( 'Content-Description: File Transfer' ); header( 'Content-Disposition: attachment; filename='.$doc_name ); print $test; ?>
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
I'm working in Excel to extract content of a table from a web page and populate Excel sheet cells with it. I'm trying to extract data from a table that gets loaded to a web page after show results method gets called. I have an error that says "Run-time error ...
When accessing from ######1.co.uk (which has an SSL) to document root ###/production everything works fine.
However when accessing ###/production from ######2.co.uk (which doesn't have an SSL - set up in the vhost file) the home page displays fine but the other pages are returning a 404.
Here's the entry in ...