[thelist] writing a variable to file in PHP
Tom Dell'Aringa
pixelmech at yahoo.com
Tue Jan 7 14:54:01 CST 2003
Heyo,
I'm dynamically writing a PHP file that has some variables in it. Two
of my opening lines are thus:
---------------------
$body = "<?\n";
$body .= "$connect = mysql_connect 'ip', 'login', 'pw');\n";
---------------------
When I open my generated file, I only get:
---------------------
= @mysql_connect('127.0.0.1', 'moshe', 'silvermysql');
---------------------
For some reason it is *I think* trying to write the value of
$connect. How can I avoid this so it gets written out as a variable?
I figured since it was inside the string it would, but then PHP does
parse vars inside a string...help!
Tom
=====
var me = tom.pixelmech.webDeveloper();
http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
More information about the thelist
mailing list