将php页面中的mysql值传递给joomla文章,并在joomla文章中显示相关数据

将php页面中的mysql值传递给joomla文章,并在joomla文章中显示相关数据,php,joomla,article,Php,Joomla,Article,我们正在开发一个应用程序。网站正在由joomla开发。管理面板正在使用纯php开发。在索引页面(joomla)上,我们正在显示后端的一些详细信息。 我的问题是,当我们点击页面上的一条记录时,我们能在文章中显示相关数据吗 希望我问得清楚。 请与我们分享你的想法 提前谢谢是的,如果我正确理解您的问题,您可以这样做 打开Joomla的main index.php。这是html根目录中的index.php,而不是其中一个模板文件夹中的index.php 在文件底部附近,或者在最后一行,您可能会看到如下内

我们正在开发一个应用程序。网站正在由joomla开发。管理面板正在使用纯php开发。在索引页面(joomla)上,我们正在显示后端的一些详细信息。 我的问题是,当我们点击页面上的一条记录时,我们能在文章中显示相关数据吗

希望我问得清楚。 请与我们分享你的想法


提前谢谢

是的,如果我正确理解您的问题,您可以这样做

打开Joomla的main index.php。这是html根目录中的index.php,而不是其中一个模板文件夹中的index.php

在文件底部附近,或者在最后一行,您可能会看到如下内容:

// Return the response.
echo $app
将该行替换为以下内容:

// Return the response.
// parse $app for server side includes statements and execute them
// note: this will only work for executable code, it will not import text or html files
// we would need to check to see if the file were executable, then read it rather than execute it if it were not
$output = $app;
while(ereg('(<!--#include virtual="([^&]+)" -->)',$output,$groups)){  // extract the ssi command and the command
$i = 0;
    while(!$inline){                                        // sometimes exec() fails for want of memory so we try a few times
        exec($groups[2],$array);                            // get the output from the command
        foreach ($array as $element)                        // concatenate the lines of output into a single string
            $inline = $inline . $element . "\n";            // appending a new line makes the html source more readable
        $i++;
        if($inline | $i > 5)
            break;
        sleep(1);
    }
    $output = ereg_replace($groups[1],$inline,$output); // replace the ssi command with the output
}
echo $output;
这将允许您在文章中放置标准的服务器端包含语句。例如,如果您希望在index.php所在的目录中执行一个php文件,并且该文件名为dynamic_content.php,您可以在文章中键入:


然后,该脚本的输出将包含在文章的文本中。您可以在同一篇文章中使用多个ssi命令。

这确实不清楚。文章并不真正显示在后端,它们只是在那里创建和编辑的。如果您正在制作一个组件,单击时显示的内容取决于您告诉它显示的内容。