Have been trying to figure this out all day assuming its just a small error.....
I\'m trying to use the file_put_content
to put a variables value into anoth
The problem is that you are using single quotes, so the variables are not shown.
Change:
file_put_contents("/home/files/1/741/html/WP/$GDI_user/config.php",'
$affiliate_reference = "$UNQ_ID";
echo $UNQ_ID;
?>');
to:
file_put_contents("/home/files/1/741/html/WP/$GDI_user/config.php","
$affiliate_reference = '$UNQ_ID';
echo $UNQ_ID;
?>");
Note that I have changed the double quotes for $affiliate_reference
to single quotes. If you need double quotes, you can escape them:
$affiliate_reference = \"$UNQ_ID\";