<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style type="text/css"> //body { font-family:Verdana; font-size:12px; margin:0 auto;} //#container {margin: 0 auto; width:70%;} th { background-color:#0099CC;color:#FFFFFF;} tr { background-color:#F0F8FF;text-align:center;} td { background-color:#CCFFCC;} td.pack { background-color:#00FFFF;} </style> </head> <body BACKGROUND='https://mobile.yungtay.com.cn/image/bgp.gif'> <center><h2>BARCODE扫描??成品统计(箱号、储位维护)</h2> <form name=query action='' method=get> <table style="width: 100%" class="style3"> <tr> <th>储位</th> </tr> <tr> <td><input type="text" size=70 name="Storage"> <input type="submit" value="新增/修改"> </td> </tr> </table> <hr> </form> <? if(isset($_GET['Storage'])){ $Storage = intval( $_GET['Storage'] ); } echo $Storage;?> </body></html>
intval变量转成整数类型。所以只能输出数字,其余类型自动转换为int
对呀,你就是这样设计的!
$Storage = intval( $_GET['Storage'] );
把传入的数据转换为整数
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号