avatar.alex Posted March 21, 2007 Share Posted March 21, 2007 Ok i need a script that will allow my to edit the css file through a website. Like without going through the cPanle I could just click a link throught the site and it will allow me to edit it. Link to comment https://forums.phpfreaks.com/topic/43747-edit-css/ Share on other sites More sharing options...
shaunrigby Posted March 21, 2007 Share Posted March 21, 2007 look into fopen functions Link to comment https://forums.phpfreaks.com/topic/43747-edit-css/#findComment-212384 Share on other sites More sharing options...
legohead6 Posted March 22, 2007 Share Posted March 22, 2007 heres a script that opens a page to edit, $path="userfolders/$folder/$file"; $text = stripslashes(file_get_contents($path)); echo "<form method=POST><textarea name=content rows=50 cols=100>$text</textarea><br><input type=submit name=submit value=update>"; if(isset($_POST['submit'])){ unlink("userfolders/$folder/$file"); $page = fopen("userfolders/$folder/$file", 'x+'); $content=$_POST['content']; fwrite($page, $content); echo "Updated Successfully"; Link to comment https://forums.phpfreaks.com/topic/43747-edit-css/#findComment-212442 Share on other sites More sharing options...
avatar.alex Posted March 22, 2007 Author Share Posted March 22, 2007 ok i used that code and the message looks like this Parse error: syntax error, unexpected $end in /home/mystrh00/domains/witchin.net/public_html/page/editcss.php on line 13 now I dont really understand this part of the code: $path="userfolders/$folder/$file"; now do i put my dictionary path in there of just leave as is Link to comment https://forums.phpfreaks.com/topic/43747-edit-css/#findComment-212466 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.