data.class.php
<?php class Data { public $sMessage; private $sSecret; public function __construct($sInput) { $this->sMessage = $sInput; } public function setSecret() { } public function getSecret() { return $this->sSecret; } public function getMessage() { return $this->sMessage; } } $oData = new Data('Tajny string...'); $oData->setSecret(); ?>
oraz index.php
<?php // data.class.php { { { } } } $sText = $sFile; // base64_encode() ?>
Wywołując funkcję eval() dostaję błąd. W którym miejscu popełniam błąd?
Natomiast coś takiego
działa bez problemu..
<?php ?>