0

I wanna know if its possibly play an audio located another folder outside project.

something like this:

My index.html is at location: /var/www/html/myProject

And the audio location is:

<source src="/var/opt/mp3/song.mp3" type="audio/mp3">
JuanAndres
  • 27
  • 7
  • Does this answer your question? [Access a file which is located before / outside the server root directory?](https://stackoverflow.com/questions/13357994/access-a-file-which-is-located-before-outside-the-server-root-directory) – evolutionxbox Apr 05 '20 at 21:23
  • nope, because I want play the audio with Javascript, In your example link is with PHP – JuanAndres Apr 05 '20 at 21:44
  • I think you could do it with `PHP` but not a direct link :/ – Adnane Ar Apr 05 '20 at 21:50
  • If you could do it in JavaScript or HTML you have a problem. – evolutionxbox Apr 05 '20 at 21:53
  • @evolutionxbox yes, thinking better, It's impossibly acces another file via HTTP, otherwise it would be an serious security problem , I think.. If someone can confirm this, we can close this post. – JuanAndres Apr 05 '20 at 22:25
  • I think the answer is, no this is not possible without a server-side solution. – evolutionxbox Apr 06 '20 at 08:54

0 Answers0