Jump to content

How to protect HTML?


FlyingIsFun1217

Recommended Posts

Hey, me again :)

 

I'm trying to keep the html of an html file protected, so that someone can't just go to the url. I figured at first that I'd just do echo's around each line, but this would involve quite a bit of typing (theres lots of html). But if I want to just do an include('myfile.html'), then I'm exposing the file as said for anybody to use.

 

Is there a way of having an include to html that can't just be opened by the user?

 

FlyingIsFun1217

Link to comment
https://forums.phpfreaks.com/topic/114167-how-to-protect-html/
Share on other sites

You could use external CSS files...otherwise I'm not sure there is a way around it. Why is it so important to hide the HTML?

 

It gives functions that should not be allowed to be used by 'guests'.

 

I'll use the method posted right after mine. Seems like what I'd be looking for.

 

FlyingIsFun1217

Link to comment
https://forums.phpfreaks.com/topic/114167-how-to-protect-html/#findComment-587021
Share on other sites

You could stop Apache from allowing requests to that folder with a .htaccess file... >_>

 

Guess that would be a possibility. Would php have access to it (sorry if that sounds like a stupid question, but I've never bothered to go into that aspect of servers before)?

 

FlyingIsFun1217

Link to comment
https://forums.phpfreaks.com/topic/114167-how-to-protect-html/#findComment-587031
Share on other sites

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.