SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    { SOLVED } How to secure INI file?

    { SOLVED } I have INI file for settings. Now, i cant store this file out of the server root, and it HAS to be in public_html.

    Is there any way securing this file such that it can only be read by another PHP script and not any other users.
    ---------------------------
    Errors = Improved Programming.
    My Site

  2. #2
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    { solved }
    Never mind solved it. And this is how i did it, in case somebody wants to know
    OR somebody wants to give other suggestions

    Code:
    ;<?php   if(!defined('LOAD')){ dIe('Not Found');} ?>
    
    [DB]
    host = localhost
    And i named it as "test.ini.php". it works the same way if i use parse_ini_file to retrieve the values, but if i try to read it directly then it would just die.
    ---------------------------
    Errors = Improved Programming.
    My Site


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •