03-06-2012, 06:43 AM
I tried to write the variable my_var into a text file but it only shows null after executing the code. Can anybody help pls?? Below is my code
my_var = 123;
$fh = fopen($file, 'w') or die("can't open file"); ?>;);
document.write(<?php $stringData = my_var ?>;);
document.write(<?php fwrite($fh, $stringData); ?>;);
document.write(<?php fclose($fh); ?>;);
03-06-2012, 06:45 AM
And since it's urgent, you've probably posted on other forums as well.
Have you received a solution from other websites yet?
03-06-2012, 06:58 AM
not yet and i only posted it in this forum
03-06-2012, 07:16 AM
so when's your deadline?
03-06-2012, 07:37 AM
If you want people to spend time and trouble answering your question you really must read the forum rules and posting guidelines, especially those about silly thread titles and the use of code tags (surely it is obvious why those are needed?). webdev1958 is trying to tell you that your post is not urgent for us, and must await its proper turn. Why do you think that you are entitled to priority?
Edit your post and then perhaps someone will answer you.
It is your responsibility to die() if necessary….. - PHP Manual
03-06-2012, 07:54 AM
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.