ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

propagate a style.css and index.php to work in all subdirectories in a webfolder

(1/2) > >>

Thanks to those who offered answers on the php website for hosting files.   

Working from all your suggestions i was finally able to get exactly what i wanted.   Unfortunately, I have run into a problem with the CSS for the folder that contains the document files. 
The hosting file is an Apache Website that does exactly as needed.  I can add a folder to it named 'documents' that will display the documents in it in a perfect format exactly as asked.  The problem is that for it to work,  it requires a specific 'index.php and 'style.css' that are not used elsewhere.  To get the documents to display in all levels of each subfolder,  I have to put th0ose two files in each of the directory levels of every folder. 
Sublevels without those two files use the default Apache directory listing CSS which does not look very good.

Is there a place or file I can use to set the 'documents' folder to always display using the special index.php and style.css on every subdirectory in that folder?
Thanks for advice

I'm not an expert on Apache, but if al else fails, you could create logical links to the 2 files in each subfolder, avoiding duplicate files, and keeping a single point of maintenance.

Any chance you can share those index.php and style.css files to see if a fix might actually be possible in the index.php file?

ATH:  i have attached the entire code here.  Only the style.css and Index.php are giving me problems.
i was able to add the single java code to the website JS folder andit works fine from there
And when you look at then, you will see inside them both it shows he the path and was what I assumed was the problem.  It shows their location to be "./name"
as in ./.style.css  and ./.index.php etc

it is a very concise and simple directory display snippet for an apache website.  Now if only it would work on folders that have multiple subfolders etc.  Instead the site drops back to using the apache directory listing default after level 1

Sorry not sure what i did wrong the first time  but the attachment failed.  the other post has complete code in


DUH  I think i don't wait long enough.  :(


[0] Message Index

[#] Next page

Go to full version