我们如何根据 ID 号创建临时页面并检索该 ID 号数据?

问题描述

我目前有一个包含人们数据的表“candidatedetails”。如果我手动创建页面,我可以检索数据并显示在页面中。但是我不想手动创建每个页面。

我有每个人的链接:

echo '<td> <a href="'.$row['payroll_number'].'"><img src="images/document.jpg" height="30" > </a></td>';

这链接到唯一 ID (payroll_number) 为 192.168.1.16/5100(这里的 5100 是工资单编号)

我正在尝试使用以下内容,以便当点击上面的链接时,它会创建一个临时文件并转到一个 tmp 页面,其中所有候选人的详细信息都可以查看

`<?php
$temp = tmpfile();

fwrite($temp,file_get_contents("$path/$filename"));
//Rewind to the start of file
rewind($temp);
//Read 1k from file
echo fread($temp,1024);

//This removes the file
fclose($temp);
?>`

screenshot of people table with link to record

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)