The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Existing site question
#1
I have an existing site that I added US to. When I look in page management I dont see all of my PHP files. How can I add existing files in my root and the subdirs? I have sub dirs that have thier own index.php. Is there a way I can protect those as well? I am guessing something with .htaccess. I dont want people going directly to http://mysite.com/subdir/index.php for example.

Thanks in advance!
  Reply
#2
Yep. That's not a problem at all. You just have to add the folders that you want to protect in the z_us_root file.

Open the file z_us_root.php.

Line 2 has an array,

$path=[”,’users/’,’usersc/’];

https://mydomain.com and you already have https://mydomain.com/users, https://mydomain.com/usersc and you want to add a folder called ‘app’ (which would be https://mydomain.com/app

Edit the file z_us_root.php line two to say

$path=[”,’users/’,’usersc/’,’app/’];

and your php files should show right up in the admin_pages section of the dashboard and in your database.

Wordpress uses curly quotation marks. Make sure you use straight ones (' & ")and that you don't have any spaces in your array.

Also, in order for UserSpice to actually protect the page, you need 2 lines of code at the top of each page.

Code:
<?php require_once 'init.php'; ?>
and
Code:
<?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?>

Note that you want the actual relative path to init.php so if you have the folders
/
/users
/usersc
/yoursubdir
and your file is in /yoursubdir
the init line should be
Code:
<?php require_once '../users/init.php'; ?>
  Reply
#3
Awesome! Thank you!!

-M
  Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)