shasi kanth
shasi kanth

Reputation: 7094

Upload a file to public_html folder

I have a joomla component that fetches the audio songs from the music folder on the server and plays them in the front end. And the users can upload their songs from the front end.

But the problem is that, the component settings are such that the music folder path must be outside of the web root.

The path looks like:

/home/username/public_html/audio

But i am confused how to upload the files to a location inside 'public_html' folder, using php. What should be the destination address that i can use in my code?

Upvotes: 2

Views: 1650

Answers (1)

idea34
idea34

Reputation: 723

To get the server path in the Joomla environment:

echo JPATH_SITE;

Examples of usage

Upvotes: 2

Related Questions