Good Morning,
I'm starting to implement simple php into my website, basically for information redesign purposes, and I am very new to php, like out of the birth canal new. Ive created some php files that contain html and I redirect them with the simple include command. I was just wondering if there is a way to keep these files from being accessed alone, ie; http://www.yourwebsite.com/info.php, ? Would I have to change the access to these files or should I just put them in a directory that I only know about? If there is a nice way to do it I would greatly appreciate any info.
Thaks,
Dave

1) Put them outside of your document root

2) Block access to them with Apache

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.