PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
xNuManx wrote:I put new in the input box, then ran the script and it echoed new. but the file is still unchanged.
it didn't echo anything else? If not, then it's not opening the file variables.php correctly (or variables.php is empty). Make sure it's in the same directory and everything.
xNuManx wrote:I put new in the input box, then ran the script and it echoed new. but the file is still unchanged.
it didn't echo anything else? If not, then it's not opening the file variables.php correctly (or variables.php is empty). Make sure it's in the same directory and everything.
When i put wrong directory it gives me this error:
Warning: file_get_contents(includes/variables.php) [function.file-get-contents]: failed to open stream: No such file or directory in name_do.php on line 4
so i know its fine . Is this the only method there is to do this?
xNuManx wrote:Yes, im pretty sure. I tried it again and only echoed New then i input hi and it echoed hi. Any suggestions?
Variables.php is empty, or file_get_contents isn't actually getting the content. I suggest opening the file and checking. Unfortunately, I'm leaving work now, so I won't be able to help any further until much later tonight. I've tested the code I gave you though, and as far as I can tell, it should work just fine.
xNuManx wrote:Yes, im pretty sure. I tried it again and only echoed New then i input hi and it echoed hi. Any suggestions?
Variables.php is empty, or file_get_contents isn't actually getting the content. I suggest opening the file and checking. Unfortunately, I'm leaving work now, so I won't be able to help any further until much later tonight. I've tested the code I gave you though, and as far as I can tell, it should work just fine.
Weird, is not empty. Well thanks for trying anyways