✏️ 正在编辑: createToken.php
路径:
/home/llpreacharge/public_html/Project/user/createToken.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php session_start(); if($_SESSION['rid']) { $userid=$_SESSION['rid']; } else { header('location:../login.php'); } ?> <?php include'connection.php'; ob_start(); $length = 32; $random_string=""; while(strlen($random_string)<$length && $length > 0) { $randnum = mt_rand(0,61); $random_string .= ($randnum < 10) ? chr($randnum+48) : ($randnum < 97 ? chr($randnum+55) : $randnum+122); } $random_string; $quUpdateToken = "update retailer set ApiToken='$random_string' where Userid='$userid'"; if(mysqli_query($con,$quUpdateToken)) { header('location:api_documents.php'); } ob_end_flush(); ?>
💾 保存文件
← 返回文件管理器