Asp 经典页面到 php
Asp classic page to php
我在经典 asp:"http:/blablabla/123.asp?id=1293" 中有这个 url。我的问题是,有没有办法在不使用表单和提交的情况下将 ID 号传递给外部 php 脚本,或者这是唯一的方法?
我的 data.php 脚本:
<?php
$xxx = $_POST["xxx"];
//... some code
$gantt->render_complex_sql("SELECT * FROM gantt_tasks WHERE something = '".$xxx."'" , "id", "start_date,duration,text,progress,parent","");
?>
我的“123.asp?id=1293”页面:
<html>
<head>
// .. scripts and title
</head>
<body>
<form id="form1" method="post" action="data.php">
<input type="hidden" name="xxx" value="Request.QueryString("id")" />
</form>
<div id="gantt_here" style='width:100%; height:100%;'></div>
<script type="text/javascript">
gantt.init("gantt_here");
gantt.load("data.php");
</script>
</body>
</html>
而且我也不想使用 "Response.Redirect" 页面。
你可以这样做:
更新:
gantt.load('data.php?id=<%= Request.QueryString("id") %>');
但是在同一项目中使用旧 asp 文件和 php 文件听起来很奇怪。
我在经典 asp:"http:/blablabla/123.asp?id=1293" 中有这个 url。我的问题是,有没有办法在不使用表单和提交的情况下将 ID 号传递给外部 php 脚本,或者这是唯一的方法?
我的 data.php 脚本:
<?php
$xxx = $_POST["xxx"];
//... some code
$gantt->render_complex_sql("SELECT * FROM gantt_tasks WHERE something = '".$xxx."'" , "id", "start_date,duration,text,progress,parent","");
?>
我的“123.asp?id=1293”页面:
<html>
<head>
// .. scripts and title
</head>
<body>
<form id="form1" method="post" action="data.php">
<input type="hidden" name="xxx" value="Request.QueryString("id")" />
</form>
<div id="gantt_here" style='width:100%; height:100%;'></div>
<script type="text/javascript">
gantt.init("gantt_here");
gantt.load("data.php");
</script>
</body>
</html>
而且我也不想使用 "Response.Redirect" 页面。
你可以这样做:
更新:
gantt.load('data.php?id=<%= Request.QueryString("id") %>');
但是在同一项目中使用旧 asp 文件和 php 文件听起来很奇怪。