php - "Open with" dialog for custom file format

Solution:
I got it done with suchfile.php
:
<?php
// We'll be outputting a .magicExt
header('Content-Type: application/magicExt');
// It will be called downloaded.magicExt
header('Content-Disposition: attachment; filename="downloaded.magicExt"');
// The .magicExt source is in original.magicExt
readfile('original.magicExt');
Based on PHP header() function
and thatindex.php
:
echo '<a href="file.php">file</a>';
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: cannot set properties of undefined (setting '_dt_cellindex')
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.