Russ
<b>Retired *****</b>
- Messages
- 3,168
- Reaction score
- 2
- Points
- 38
I am trying to write a php script, that writes a php file.. all is going good until line 180.. Here's the error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/rpope904/public_html/x10chat/signup_2.php on line 180
Here's the code:
LINE 176> $stringData = "<param name=\"CABINETS\" value=\"irc.cab,securedirc.cab,pixx.cab\">\n";
LINE 177> fwrite($fh, $stringData);
LINE 178> $stringData = "<?\n";
LINE 179> fwrite($fh, $stringData);
LINE 180> $stringData = "$ni = $_POST[\'nickname\']; \n";
LINE 181> fwrite($fh, $stringData);
LINE 182> $stringData = "echo \"<param name=nick value=\".$ni.\"_xC\">\n";
LINE 183> fwrite($fh, $stringData);
LINE 184> $stringData = "?>\n";
Basically, what I need it to write to the file is:
<?
$ni = $_POST['nickname']; LINE 180
echo "<param name=nick value=".$ni."_xC>\n"; LINE 182
?>
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/rpope904/public_html/x10chat/signup_2.php on line 180
Here's the code:
LINE 176> $stringData = "<param name=\"CABINETS\" value=\"irc.cab,securedirc.cab,pixx.cab\">\n";
LINE 177> fwrite($fh, $stringData);
LINE 178> $stringData = "<?\n";
LINE 179> fwrite($fh, $stringData);
LINE 180> $stringData = "$ni = $_POST[\'nickname\']; \n";
LINE 181> fwrite($fh, $stringData);
LINE 182> $stringData = "echo \"<param name=nick value=\".$ni.\"_xC\">\n";
LINE 183> fwrite($fh, $stringData);
LINE 184> $stringData = "?>\n";
Basically, what I need it to write to the file is:
<?
$ni = $_POST['nickname']; LINE 180
echo "<param name=nick value=".$ni."_xC>\n"; LINE 182
?>