Previous sNews versions > Programming
Locating snews.php outside the root directory
(1/1)
Keyrocks:
There is an easy way to hide your snews.php file... by placing it outside the root directory in another folder. And you can do this with any php file. Let's say we placed the snews.php file inside a folder called misc. We would then create a new php file with the following string:
--- Quote ---<?php include("misc/snews.php"); ?>
--- End quote ---
We can then save this new file with any name, in the root directory where snews.php used to be. For this example... let's call it buffer.php.
Then, in the top of index.php, we include our new buffer.php file:
--- Quote ---<?php session_start();
include('buffer.php');
?>
--- End quote ---
All we are really doing here is calling the functions of snews.php through another file from another location... the end result is the same.
Jim:
Hello Keyrocks,
I'm interested in your post but apparently the first quote, under your first paragraph, is erased. Would it be possible to quote that piece of information again ? Many thanks for your help.
Oh, btw, this is a great program, lightweight and easy to use. I like it. Well done to you all !
Regards
Jim
Keyrocks:
Fixed Jim - see above.
You may come across other old posts on this site with blank quote boxes.
This happened when our site was upgraded a few years ago. The data itself is still in the database... just doesn't show. We don't know why, but we've found just opening the post for an edit and re-saving brings it back into view.
If you come across any others like that, just let us know and one of our volunteer admins will fix it.
We hope you find sNews useful for your projects.
Jim:
Keyrocks,
Many thanks for your help and prompt reply, much appreciated. Will report any blank quote boxes if I come accross with them. Thanks again !
Jim
Navigation
[0] Message Index
Go to full version