Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.