Forum Moderators: coopster
<OBJECT ...>
<PARAM NAME="SRC" VALUE=loaddata.php?data=thefile.xyz >;
</OBJECT>
Whereas the loaddata.php reads the file from a certain directory.
The problem is,if the reading method in the loaddata.php
is, for instance, readfile($_GET['data']), the data are read as binary and the Object is not displayed.
Is there any other to read the VALUE via php ?
Thanks.
the data are read as binary and the Object is not displayed
loaddata.php needs to tell browser what type of data content that is, for example if that was an .swf or a .jgp you need to send header that the content i am sending is .swf or an image.
For example
<?php
header('Content-type: application/pdf');
readfile('original.pdf');
?>
Then it should work ;)
[php.net...]