我想在我的服务器上运行外部PHP文件我发现我可以使用exec或者popen.
我读过popen用于Windows的exec用途,用于Linux.
另一方面,我看到了popen可以用于Linux的示例.我还是个新手.可能吗?如果两者兼而有之exec,你推荐哪种Linux popen?
请问有什么好处,因为我仍然感到困惑.
我有两个 MySQL 表。第一个用于用户的凭据,即用户名、密码、business_id(系统生成)。第二个具有多个实体的用户配置文件,例如企业名称、位置、profile_id 和企业 ID(系统生成 - 与 business_id 相同的数字)。
用户可以编辑他们的业务细节的细节,即他们在第二个表格中的细节。业务 ID 将显示为“abcdef”,配置文件 ID 将显示为 1234567,如果他们有第二个业务配置文件,则显示为 1235879。
为了编辑每个配置文件,我必须有以下 URL
<a href="edit_profile.php?id=1234567">Edit Business Profile</a>
Run Code Online (Sandbox Code Playgroud)
对于第二个,它将是
<a href="edit_profile.php?id=1235879">Edit Business Profile</a>
Run Code Online (Sandbox Code Playgroud)
反过来,当点击 a href 时,浏览器中的 url 将是edit_profile.php?id=1234567,第二个将是edit_profile.php?id=1235879
难道是可能的,而不必edit_profile.php?id=1234567和edit_profile.php?id=1235879在URL我会edit_profile.php?id=1234567和第二个会edit_profile.php
我不希望用户看到 id,即只有 edit_profile.php
理想情况下,我想使用 PHP 解决方案。