- Joined
- Dec 16, 2011
- Messages
- 1,994
- Reaction score
- 633
Well, I am coding a small script, something that I thought would somewhat come in handy for my website, just so I don't have people directly viewing the source of my CSS files, etc.. It's just something for fun I guess, not too big of a deal. And just to improve my PHP skills, slightly (I guess....)
Here is the index.php (the file which does most of the work):
And here is the requested file:
The file being requested, I would replace the ECHO with the file I want to somewhat 'protect' - for example, CSS or Javascript. And of course add the appropriate header for what I'm using, IE: CSS, JS, TEXT
Now, I am not a pro at PHP, I am still learning, per se. I would LOVE all feedback, to help improve my skills, and this little project I'm making. What can be done better? What NEEDS to be done better? Am I going about this right?
I am also a bit confused on how I should LAYOUT my PHP, to make it look simply neat, so if someone wants to show me a demonstration on how it should be properly laid out, that would also be a huge help!
Cheers, Liam. :fanny:
Here is the index.php (the file which does most of the work):
You must be registered to see links
And here is the requested file:
You must be registered to see links
The file being requested, I would replace the ECHO with the file I want to somewhat 'protect' - for example, CSS or Javascript. And of course add the appropriate header for what I'm using, IE: CSS, JS, TEXT
Now, I am not a pro at PHP, I am still learning, per se. I would LOVE all feedback, to help improve my skills, and this little project I'm making. What can be done better? What NEEDS to be done better? Am I going about this right?
I am also a bit confused on how I should LAYOUT my PHP, to make it look simply neat, so if someone wants to show me a demonstration on how it should be properly laid out, that would also be a huge help!
Cheers, Liam. :fanny: