View Single Post
ישן 01-06-09, 15:56   # 4
intercooler3819
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Jul 2008
הודעות: 1,056

intercooler3819 לא מחובר  

אני תומך בשיתוף פתרונות...
נניצן אומר/ת:
הנה
נניצן אומר/ת:
עובד
נניצן אומר/ת:
הקוד של הקובץ אחד:
נניצן אומר/ת:
PHP קוד:
<?php

$content 
file_get_contents('./aaaa.php');

$content str_ireplace("<?php"""$content);
$content str_ireplace("<?"""$content);
$content str_ireplace("?>"""$content);

$classname preg_replace("#.+class\s+([a-zA-Z0-9\-\_]+)\s+\{.+#is""$1"$content);

eval(
$content);

eval(
'$var = new '.$classname.';');

var_dump($var);

// eof
נניצן אומר/ת:
הקוד של הקובץ השני:
נניצן אומר/ת:
PHP קוד:
<?php

/**
* @author SUPER DUPER
* @copyright 2009
*/

    
class Foo
    
{
        var 
$u 's';
        var 
$s 12;
    }

// eof
נניצן אומר/ת:
לאחד קראתי
נניצן אומר/ת:
aaaaa.php
נניצן אומר/ת:
לשני
נניצן אומר/ת:
aaaa.php
__________________
  Reply With Quote