কম্পিউটার

php-এ ftp_exec() ফাংশন


FTP সার্ভারে একটি কমান্ড চালানোর জন্য ftp_exec() ফাংশন ব্যবহার করা হয়।

সিনট্যাক্স

ftp_exec(con, command)

পরামিতি

  • কন - FTP সংযোগ

  • আদেশ - কার্যকর করার আদেশ৷

ফেরত

কমান্ডটি সফলভাবে কার্যকর হলে ftp_exec() ফাংশন TRUE প্রদান করে, অন্যথায় FALSE।

উদাহরণ

নিম্নলিখিত একটি উদাহরণ যা FTP সার্ভারে একটি কমান্ড কার্যকর করে −

<?php
   $ftp_server="192.168.0.4";
   $ftp_user="amit";
   $ftp_pass="tywg61gh";
   $con = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
   // list all the files of the remote directory
   $command = 'ls';
   // execute command
   if (ftp_exec($con,$command)) {
      echo "Executed successfully!";
   } else {
      echo "Execution failed!";
   }
   ftp_close($con);
?>

  1. পিএইচপি সর্বোচ্চ() ফাংশন

  2. PHP log10() ফাংশন

  3. পিএইচপি-তে ftp_site() ফাংশন

  4. পিএইচপি-তে ftp_raw() ফাংশন