我有function.php脚本使用php curl功能打开页面它正常工作但我有一个问题我想在下一页发布$ id但我不知道如何在下一页发布$ id ..代码是
function fire_script($script,$id,$buffer_output=1)
{
if(($buffer_output) AND (!DEBUG)) ob_start();//buffer output
$scriptRunning = new scriptStatus;
$scriptRunning->script=$script;
if ($scriptRunning->Running($id) )
{
if (DEBUG) echo "<br>Now running: $script - id=$id (debug ref. 3.9b)<br>";
$start_time = microtime(true);
$fire_type = (function_exists('curl_exec') ) ? " PHP CURL " : " PHP fsockopen ";
// "://" satisfies both cases http:// and https://
if (strstr($script,"://") ) fire_remote_script($script);
else
{
include(LOCATION.$script);
$fire_type=" PHP include ";
}
if(($buffer_output) AND (!DEBUG))
{
$scriptRunning->output=ob_get_contents();
ob_end_clean();
}
if (!$buffer_output) $scriptRunning->output="";
$scriptRunning->execution_time=number_format( (microtime(true) - $start_time), 5 )." seconds via".$fire_type;
$scriptRunning->Stopped($id);
}
}
我的$脚本是$ script =&#39; http://localhost/test.php&#39;;
我的test.php是......
<?php
include("functions.php");
$id=clean_input($_GET['id']);
$dbc = dbc::instance();
$result = $dbc->prepare("select * from product where id='$id' ");
$rows = $dbc->executeGetRows($result);
$id= $row["id"];
echo "My id is "$id;
?>
答案 0 :(得分:0)
您:强>
<p id="p">
Hi , It's a new question in stackoverflow!
</p>
应该是这样的:
$script = http://localhost/test.php
然后你的
$script = http://localhost/test.php?bid=$id
将在您的&#39; testpage.php&#39;