discorevilo Posted April 5, 2006 Share Posted April 5, 2006 i have made a cPanel type File Manager for editing selected pages only however when it saves them it puts a \ by all the " and ' witch i cant have it doing can anyone help... here's the code i am using to save the files[a href=\"http://www.olliespage.net/stuff/stuff2.txt\" target=\"_blank\"]http://www.olliespage.net/stuff/stuff2.txt[/a] (i couldnt post the code so i had to link to it) Quote Link to comment https://forums.phpfreaks.com/topic/6685-debuging-cpanel-type-interface/ Share on other sites More sharing options...
Hooker Posted April 6, 2006 Share Posted April 6, 2006 Try looking into the "stripslashes()" function. Quote Link to comment https://forums.phpfreaks.com/topic/6685-debuging-cpanel-type-interface/#findComment-24327 Share on other sites More sharing options...
discorevilo Posted April 6, 2006 Author Share Posted April 6, 2006 umm where would i have to put it to remove the slashes that are wirten? Quote Link to comment https://forums.phpfreaks.com/topic/6685-debuging-cpanel-type-interface/#findComment-24331 Share on other sites More sharing options...
khendar Posted April 6, 2006 Share Posted April 6, 2006 I assume you mean its putting slashes inside the content of the file correct?In which case you need to call stripslashes() on the $somecontent variable prior to writing it to the file. Quote Link to comment https://forums.phpfreaks.com/topic/6685-debuging-cpanel-type-interface/#findComment-24337 Share on other sites More sharing options...
DrDre Posted April 6, 2006 Share Posted April 6, 2006 [code]if(magic_quotes_gpc()) { $somecontent = stripslashes($somecontent); }if (fwrite($handle, $somecontent) === FALSE) {[/code] Quote Link to comment https://forums.phpfreaks.com/topic/6685-debuging-cpanel-type-interface/#findComment-24346 Share on other sites More sharing options...
discorevilo Posted April 7, 2006 Author Share Posted April 7, 2006 right i've sorted that now umm i need help with listing directorys & files... i need to have it spit so that directorys have ... [code]<tr><td width=50 align=left><a href="list.php?dir=<? echo $dirnam; ?>" target="filemain"><img border=0 src="images/i-directory.gif"></a></td><td align=left><a href="list.php?dir=<? echo $dirnam; ?>" target="filemain"> <? echo $dirnam; ?></a></td><td>0 k</td><td><? echo substr(sprintf('%o', fileperms('<? echo $dirnam; ?>')), -4); ?></td></tr>[/code] ($dirnam must be the name of the directory and it must be able to do this for every directory in the folder its in) and then after all the directorys are listed then the files must be listed like so... [code]<tr><td width=50 align=left><a href="select.php?dir=<? echo $filepath; ?>" target=infofr><img border=0 src="images/i-regular.gif"></a></td><td align=left><a href="select.php?dir=<? echo $filepath; ?>" target=infofr> <? echo $filename; ?></a></td><td>0 k</td><td><? echo substr(sprintf('%o', fileperms('<? echo $filepath; ?>')), -4); ?></td></tr>[/code] ($filepath must be the full and proper path to the file from the root directory [C:/appserv/www/]) can anyone help with a code to do this? Quote Link to comment https://forums.phpfreaks.com/topic/6685-debuging-cpanel-type-interface/#findComment-24894 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.