How can I open/save an music or viddeo fille

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How can I open/save an music or viddeo fille

Postby lunaticbit » 17. July 2015 16:54

My problem is that i have to store all data into a DB tble, and retrieve them later.
The content of the php page which is made fro this task is as follows:

Code: Select all

$dbtype     = "sqlite";
$dbhost     = "localhost";
$dbname     = "alpha";
$dbuser     = "root";
$dbpass     = "r00t";

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

$sql = "SELECT type,data FROM myfiles WHERE id=".$_GET['id'];
$qry = $conn->prepare($sql);
$qry->bindColumn(1, $type);
$qry->bindColumn(2, $data, PDO::PARAM_LOB);
header("Content-Type: $type");
echo $data;

Blob types as ms-Word, PDF, TXT, etc and image files of all types (BMP, JPG, PNG, etc) are immediately opened or are asking for SAVE/OPEN when the above module is executed. The problem is how can I use he same code with or without modifications to succeed. Thank you in advance.
Posts: 21
Joined: 09. April 2015 16:24
Operating System: Windows 7

Return to XAMPP for Windows

Who is online

Users browsing this forum: Nobbie and 57 guests