Basically I want to read and write to a file then save all the compiled content another file.
Steps:
Say I have a file mycode.js with this code:
var url = ''; //this will be field throug form in php
Now in php, I will input a value of that url e.g
www.google.com
How will I be able to append the url I just entered to my js file?
Expected output:var url = 'www.google.com';
Also follow question, upon successful append of the value to my JS file I will now create a new file (newlyappend.js), like a save as thing. Where the content of the file is the newly append code:
var url = 'www.google.com';
Would like to achieve this using php.