Jump to content

opendir function and website...


smarchand291

Recommended Posts

:confused:

 

Hi everyone,

I'm building a website for a music band and want to

automate the adding of new album/disc so they wont have to

update a php file to print out .

 

I mean, a new album is release , then dump the mp3's, lyrics, cover pics

in their respective directory using naming convention

so my php read the directory structure and so one...

 

but my problem is the php function opendir read the filesystem...

is there a more secure way to do this ?

and I presume the web host wont let me do this...

 

thanks for any tips and tricks

steph

Link to comment
https://forums.phpfreaks.com/topic/246578-opendir-function-and-website/
Share on other sites

The web host should let you do this - it's your web space. But, you will be restricted to only accessing your areas. You might want to consider putting the storage folder outside the web accessible directory. Aside from that, I would suggest using glob() to access the files.

but my problem is the php function opendir read the filesystem...

is there a more secure way to do this ?

and I presume the web host wont let me do this...

If they block opendir() then you need to find another host. It'd be like a driver's ed. school teaching that you should never use the radio because it might distract you from the road. Kinda.

 

Directories are fine. Do you specifically want to do that rather than, say, have the band go to some kind of "add album" webpage, fill in some details and upload some files?

the idea of a webpage to let them input information is, I would say,

deja vu, but a working solution. But if the opendir or scandir or whatsoever

works on my host, I would prefer. that would be neat :)

for 250$ for the coding, put in place and domaine name, for 1 year

let say it's because they are friends to me...

 

the alternative input page is a nice one but require coding from my side

thanks, it helped just reading your replies

steph

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.