DimisD Posted January 28, 2009 Share Posted January 28, 2009 Hi there, I have a "view.php" page that displays MySql database records for the site visitors. Inside this page i require one page tha has the database connections info: <?php require_once('Connections/connx_news.php'); ?> --------------------- connx_news.php ---------------------- <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_connx_news = "localhost"; $database_connx_news = "db_name"; $username_connx_news = "usr_name"; $password_connx_news = "pass"; $connx_news = mysql_pconnect($hostname_connx_news, $username_connx_news, $password_connx_news) or trigger_error(mysql_error(),E_USER_ERROR); ?> --------------------- - ---------------------- How can i restrict access to the Connections folder? ??? If i do the folder password protected it asks for username & password. Thank you in anticipation! PS. I created the webpage with dreamweaver Link to comment https://forums.phpfreaks.com/topic/142774-restrict-access-to-folder/ Share on other sites More sharing options...
kittrellbj Posted January 28, 2009 Share Posted January 28, 2009 I would recommend first placing an empty index.html file in the folder to prevent people from viewing the directory tree. Second, you can CHMOD the directory to allow only the server/your group to use the file. I would recommend reading: http://en.wikipedia.org/wiki/Chmod http://www.catcode.com/teachmod/ http://www.phpjunkyard.com/ftp-chmod-tutorial.php Those are only a few. Google "CHMOD" or "FTP CHMOD" or "Change Mode" for even more. You may have to play with it a bit to get the configuration correct. Link to comment https://forums.phpfreaks.com/topic/142774-restrict-access-to-folder/#findComment-748368 Share on other sites More sharing options...
DimisD Posted February 1, 2009 Author Share Posted February 1, 2009 Thank you very much kittrellbj!! Works fine! Link to comment https://forums.phpfreaks.com/topic/142774-restrict-access-to-folder/#findComment-751896 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.