-1

我正在使用会话在 php 中编写代码,它可以在 Mozilla 和 chrome 上运行,但在互联网上探索它不起作用?请帮我解决这个问题`

<?php session_start(); if(isset($_POST['submit'])) { $_SESSION['IGNITE']="IGNITE -"; $_SESSION['IGNITE_price']=39.95; $_SESSION['IGNITE_qty']+=1; $_SESSION['total_ignite']+=39.95; } if(isset($_POST['submit1'])) { $_SESSION['REBUILD']="REBUILD -"; $_SESSION['REBUILD_qty']+=1; $_SESSION['REBUILD_price']=39.95; $_SESSION['total_rebuild']+=39.95; } if(isset($_POST['submit2'])) { $txt_rebuild=$_POST['txt_rebuild']; $txt_ignite=$_POST['txt_ignite']; $_SESSION['IGNITE_price']; $_SESSION['REBUILD_qty']=$txt_rebuild; $_SESSION['IGNITE_qty']=$txt_ignite; $_SESSION['total_rebuild']=$_SESSION['REBUILD_price'] * $_SESSION['REBUILD_qty']; $_SESSION['total_ignite']=$_SESSION['IGNITE_price'] * $_SESSION['IGNITE_qty']; } $grand_total=$_SESSION['total_rebuild']+$_SESSION['total_ignite']; ?>`
4

1 回答 1

1

PHP与您的浏览器无关,它在服务器中运行。

检查 IE 中是否启用了 cookie,应该启用 cookie 才能工作会话。

于 2013-02-07T06:08:13.323 回答