Jump to content
  • 0

pomoc Propojení FTP s webem


Lurk

Dotaz

Ahoj, chtěl bych se zeptat, chci propojit FTP server s PHP a aby mi tam vypisovalo zda server má nebo nemá zapnuté funkce. Code jsem zkoušel udělat takto, ale když "Text" mam v souboru .cfg (Text = 1) tak mi to stejně vypíše vypnuto. Nevíte jak toto opravit?

 

Nemám možnost používat mysql databázi.

 

<?php
$file = fopen("ftp://USER:PASS@IP:PORT/SF/Server.cfg", "r") or exit("Unable to open file!");
if($exp[0] == "Text")
{
$text = "$exp[1]";
}
$text = str_replace("\n","",$text);
$text = str_replace("\r","",$text);




if($text == "1"){
$textt = "<font color='green'><b>Zapnuto</b></font>";
}else{
$textt = "<b>Vypnuto</b>";
}
fclose($file);
?>
<?php
require_once "maincore.php";
require_once THEMES."templates/header.php";


opentable("Stats server");
echo "3D texty: $text";


closetable();


require_once THEMES."templates/footer.php";
?>

 

Link to comment
Share on other sites

0 odpovědí na tuto otázku

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...