james438
10-03-2008, 06:48 AM
I can include absolute filenames and relative filenames, but when I include the following file:
<?php
$conn = mysql_connect("mysql", "username", "password") or die(mysql_error());
mysql_select_db("db",$conn) or die(mysql_error());
?>
using
<?php include
'http://www.mysite.com/dbstuff.php';
$topic = "select stuff from admin where ID=0";
$verify = mysql_query($topic, $conn) or die(mysql_error());?> I get the error:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/content/m/y/s/mysite/html/test.php on line 4.
If I use
<?php
include 'dbstuff.php';
?> everything works great.
Is this a security feature? I am just surprised that using absolute filenames for other files works just fine. Hmm, maybe I will look into this further. No worries about responding right away to this post. I might be able to figure some more of this puzzle out soon.
<?php
$conn = mysql_connect("mysql", "username", "password") or die(mysql_error());
mysql_select_db("db",$conn) or die(mysql_error());
?>
using
<?php include
'http://www.mysite.com/dbstuff.php';
$topic = "select stuff from admin where ID=0";
$verify = mysql_query($topic, $conn) or die(mysql_error());?> I get the error:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/content/m/y/s/mysite/html/test.php on line 4.
If I use
<?php
include 'dbstuff.php';
?> everything works great.
Is this a security feature? I am just surprised that using absolute filenames for other files works just fine. Hmm, maybe I will look into this further. No worries about responding right away to this post. I might be able to figure some more of this puzzle out soon.