I'm an ASP developer at work and trying to learn php by night. I'm trying to write a page to display some links at of an SQL dbase. I can connect and do all the thing i normally do. I JUST CANT GET A DMAN INCLUDE TO WORK. In asp i just put my con scripts in a file and use a SSI to keep it "secure".
How do i pull this off in PHP? here's what i got so far.
this is my con script in a file off my root/dir called includes
<?php
$user = "nnnnnn"; username
$pw = "mmmmmm"; // mySQL password
$db = "mmmmmmm"; // database $mysql_access = mysql_connect("localhost", $user, $pw);
mysql_select_db($db, $mysql_access);
?>
ok no i have this code in the page that i want to included this with.
<?php
include('includes/cndb.inc');
?>
I'm always getting
Warning: Failed opening 'cndb.inc' for inclusion (include_path='.:/usr/local/plesk/php/lib/php') in /usr/local/plesk/apache/vhosts/mydomain.com/httpdocs/test.php on line 13
ANYBODY HELP ME...I'm pulling my hair out over something so stupid.
Also if there is a better way to hide my connection scripts please let me know.
Thanks in advance,
Brian Ridsdale
How do i pull this off in PHP? here's what i got so far.
this is my con script in a file off my root/dir called includes
<?php
$user = "nnnnnn"; username
$pw = "mmmmmm"; // mySQL password
$db = "mmmmmmm"; // database $mysql_access = mysql_connect("localhost", $user, $pw);
mysql_select_db($db, $mysql_access);
?>
ok no i have this code in the page that i want to included this with.
<?php
include('includes/cndb.inc');
?>
I'm always getting
Warning: Failed opening 'cndb.inc' for inclusion (include_path='.:/usr/local/plesk/php/lib/php') in /usr/local/plesk/apache/vhosts/mydomain.com/httpdocs/test.php on line 13
ANYBODY HELP ME...I'm pulling my hair out over something so stupid.
Also if there is a better way to hide my connection scripts please let me know.
Thanks in advance,
Brian Ridsdale