Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2012
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Database Security

    Hey.

    On my current website I have a PHP file with my database connection information, which connects to the daetsbase and completes a query When I need to use it on a page, I call this other php page, and output the query - as I use the same query on multiple pages. Just wondering if there is a way to stop people from getting the source code of this page, so that they cannot end up with my db connection information.

    Thanks.

  • #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,280
    Thanks
    12
    Thanked 343 Times in 339 Posts
    see File permissions so people can't see my PHP script. unless your server is misconfigured or the file does not have the .php extension, PHP source code never leaves the server.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #3
    New Coder
    Join Date
    May 2012
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok thanks.


  •  

    Posting Permissions

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