Jump to content

Variables and Include


neobolt

Recommended Posts

<?php

$header = $_COOKIE['mss']['header'];
$body = $_COOKIE['mss']['body'];
$footer = $_COOKIE['mss']['footer'];


include '$header';
include '$body';
include '$footer';


?>

 

The variables don't seem to get input. I receive this error.

Warning: main(echo $header): failed to open stream: No such file or directory

 

Link to comment
https://forums.phpfreaks.com/topic/178980-variables-and-include/
Share on other sites

<?php

$header = $_COOKIE['mss']['header'];
$body = $_COOKIE['mss']['body'];
$footer = $_COOKIE['mss']['footer'];

include $header;
include $body;
include $footer;

?>

 

You mean like this?

I still get the same error.

Warning: main(): Failed opening '' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/m/y/s/mystartspot/html/MyStartSpot/go.php on line 8

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.