Schlo_50 Posted August 14, 2007 Share Posted August 14, 2007 Hello, I have a PHP script which updates a .txt file on my server with new text for a page on my website. Im using CuteFTP to upload files. I had been able run my PHP script from one folder using a windows server, but when i moved it to another folder supported by a linux server it wouldn't run. I know i need to change the permissions of the .txt file to 777 which i have done but the script stil will not run.. <?php $loadcontent = "innertext.txt"; if($save_file) { $savecontent = ($savecontent); $fp = @fopen($loadcontent, "w"); if ($fp) { fwrite($fp, $savecontent); fclose($fp); } } $fp = @fopen($loadcontent, "r"); $loadcontent = fread($fp, filesize($loadcontent)); $loadcontent = htmlspecialchars($loadcontent); fclose($fp); ?> <form method="post" action="<?=$_SERVER['PHP_SELF']?>" name="savecontent"> <textarea name="savecontent" cols="70" rows="25"><?=$loadcontent?> </textarea> <input type="submit" name="save_file" value="Save"> </form> Quote Link to comment Share on other sites More sharing options...
Hypnos Posted August 21, 2007 Share Posted August 21, 2007 Replace "<?=" with "<?php echo ". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.