lunny Posted April 2, 2007 Share Posted April 2, 2007 Hi, I am trying work with fwrite() to write some information to a seperate URL from a php page. I am trying to send a variable with some data but this isnt working for me. For example $fp = fopen($filename, 'w+'); fwrite($fp,"<?php $test = 'Hello'; ?>"); It doesnt work I get parse errors any ideas why ? Link to comment https://forums.phpfreaks.com/topic/45275-using-fwrite-with-variables-attached/ Share on other sites More sharing options...
trq Posted April 2, 2007 Share Posted April 2, 2007 <?php $fp = fopen($filename, 'w+'); fwrite($fp,"<?php\n\$test = 'Hello';\n?>"); ?> Link to comment https://forums.phpfreaks.com/topic/45275-using-fwrite-with-variables-attached/#findComment-219833 Share on other sites More sharing options...
kenrbnsn Posted April 2, 2007 Share Posted April 2, 2007 What you've explained doesn't make sense. Please try again. The fwrite() function writes to a file, not a URL. Ken Link to comment https://forums.phpfreaks.com/topic/45275-using-fwrite-with-variables-attached/#findComment-219835 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.