0

I want to read the WAV file stored as BLOB in the MySql using PHP. But I don't have any idea about it.

Please help me.....

Thanks in advance.....

1 Answer 1

1

First a simpliest query to select the data , put it into variable and use file_put_contents( ... ) or if you want to send it as downloadable file just use echo and make sure there no junk output and correct header

Sign up to request clarification or add additional context in comments.

2 Comments

but can you show us the code please? because mine like this doesnt work while($row=mysql_fetch_array($result)){ $sound=$row['sound']; echo '<audio controls>'; echo '<source src="data:audio/mp3;base64,'.$row['sound'].'">'; echo '</audio>';
You need to use base64_encode (Or something like this) on $row['sound'] - otherwise you are pulling raw data, while in data URL base64 is specified

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.