我需要你的幫助。 Atm Im編寫一個php腳本,它可以從HTML輸入框中將單個文本輸入寫入文本文件。繼承人的代碼:使用按鈕將值傳輸到文本文件中php
<center>
<form name="form" action="" method="get">
<input type="text" name="APIkey" id="APIkey" value="API Key">
</form>
</center>
該網站的用戶需要輸入APIkey到文本框中,然後他應該按一個按鈕APIkey轉移到下面的PHP腳本將它寫在APIkey.txt
<?php
$myfile = fopen("APIkey.txt", "w") or die("Unable to open file!");
$txt = APIkey;
fwrite($myfile, $txt);
fclose($myfile);
?>
感謝您的幫助......
您可以使用AJAX方法發送API給定的代碼。 – Elby