The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Writin $vars to a txt file
Code:
<? $write_file = strtolower("../../links/$placement.txt"); $write_me = "\n<tr>\n\t<td bgcolor=\"$s_rot_one\" width=\"30%\" align=\"left\"><font face=\"tahoma, verdana, arial, helvetica\" size=\"2\"><a href=\"$url\" target=\"_blank\">$name</a></font></td>\n\t<td bgcolor=\"$s_rot_one\" width=\"70%\" align=\"left\"><font face=\"tahoma, verdana, arial, helvetica\" size=\"2\">$description</font></td>\n</tr>"; $old_txt = file($write_file); $fp = fopen($write_file, "w"); fputs($fp, $write_me); for($x=0;$x<count($old_txt);$x++) { fputs($fp, trim($old_txt[$x])."\r\n"); } fclose($fp); ?> This is what I want to see in my text file once the above code has been executed. Code:
<tr> <td bgcolor="$s_rot_one" width="30%" align="left"><font face="tahoma, verdana, arial, helvetica" size="2"><a href="url" target="_blank">name</a></font></td> <td bgcolor="$s_rot_one" width="70%" align="left"><font face="tahoma, verdana, arial, helvetica" size="2">description</font></td> </tr> Any ideas PLEASE |
#2
|
|||
|
|||
You want to escape the "$" character so that PHP will not treat it as a variable name.
So this: <td bgcolor=\"$s_rot_one\" Should become this: <td bgcolor=\"\$s_rot_one\" It's basically the same as escaping the quotation marks. Hope this helps! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|