אני יודע שאתה יכול לאחסן בתוך הקובץ php.ini את הפרטי התחברות ואז כביכול אתה משתמש בפקודה mysql_connect(); וזהו.אך זה לא רצוי, היות ולמי שיש גישה לקבצים יכול לראות את הססמא ל DB.
בכל מקרה תחפש את השורות בקובץ:
; Default host for mysql_connect() (doesn't apply in safe mode). mysql.default_host =; Default user for mysql_connect() (doesn't apply in safe mode). mysql.default_user = ; Default password for mysql_connect() (doesn't apply in safe mode). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password") ; and reveal this password! And of course, any users with read access to this ; file will be able to reveal the password as well. mysql.default_password =
|