Jump to content

Archived

This topic is now archived and is closed to further replies.

discorevilo

debuging cPanel type interface

Recommended Posts

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)

Share this post


Link to post
Share on other sites
Try looking into the "stripslashes()" function.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
[code]if(magic_quotes_gpc()) { $somecontent = stripslashes($somecontent); }
if (fwrite($handle, $somecontent) === FALSE) {[/code]

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.