Here I am trying to write a file with a directory path like d:\\$directory1 \$directory2\$f ile.txt
So I have variables in between backslashes and I keep getting errors like:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/4/4/a/2769/2769/public_html/upload/a/thankyou.php on line 69
I would like put the values in a literal string variable like:
BUT
I believe this might not be possible so in the meantime I have been writing each component to the file one piece at a time :
...and so on, that isn't working right either, I keep getting a \\ in the file instead of \ or errors depending on my syntax.
So I have variables in between backslashes and I keep getting errors like:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/4/4/a/2769/2769/public_html/upload/a/thankyou.php on line 69
I would like put the values in a literal string variable like:
Code:
$str="d:\\$directory1\$directory2\$file.txt"
I believe this might not be possible so in the meantime I have been writing each component to the file one piece at a time :
Code:
$str ="d:\\" fwrite(fp, $str); $str=$directory1; fwrite(fp, $str); $str="\\"; fwrite(fp, $str);
Comment