Ich habe 2 Funktionen geschrieben.
Nun möchte ich diese beiden kombinieren.
Ziel ist es, dass dieser Link domain/datei.php?variable=berlin übergeben wird an die Funktion "Show_FIle"
Ich habs so versucht
[show_file file="domain/datei.php?variable=<?php echo $ausgabe;?>"]
oder
[show_file file="domain/datei.php?variable=[variablemein]"]
Was habe ich falsch überlegt?
Funktionen
===
URL
---
function show_file_func( $atts ) {
extract( shortcode_atts( array(
'file' => ''
), $atts ) );
if ($file!='')
return @file_get_contents($file);
}
add_shortcode( 'show_file', 'show_file_func' );
---
Variable
---
function meine_variable()
{
$ausgabe = $_GET["ort"];
return $ausgabe;
}
add_shortcode( 'variablemein', 'meine_variable' );
---
Nun möchte ich diese beiden kombinieren.
Ziel ist es, dass dieser Link domain/datei.php?variable=berlin übergeben wird an die Funktion "Show_FIle"
Ich habs so versucht
[show_file file="domain/datei.php?variable=<?php echo $ausgabe;?>"]
oder
[show_file file="domain/datei.php?variable=[variablemein]"]
Was habe ich falsch überlegt?
Funktionen
===
URL
---
function show_file_func( $atts ) {
extract( shortcode_atts( array(
'file' => ''
), $atts ) );
if ($file!='')
return @file_get_contents($file);
}
add_shortcode( 'show_file', 'show_file_func' );
---
Variable
---
function meine_variable()
{
$ausgabe = $_GET["ort"];
return $ausgabe;
}
add_shortcode( 'variablemein', 'meine_variable' );
---
Comment