source: tags/instant_messenger/inc/class.FileDefine.inc.php @ 318

Revision 318, 603 bytes checked in by niltonneto, 16 years ago (diff)

Commit feito pelo desenvolvedor (rodrigosouza).

  • Property svn:executable set to *
Line 
1<?php
2
3class FileDefine
4{
5        const FILE = 'instant_messenger.define.php';
6
7        final function getParams($pParam)
8        {
9                $array_values = explode("\n", $pParam['val']); 
10                $string = "<?php \n";
11
12                foreach($array_values as $tmp )
13                {
14                        $nvalue = explode(";", $tmp);
15                        $string .= "define('" . $nvalue[0] . "', '" . $nvalue[1] . "');". "\n";
16                }
17               
18                $string .= "?>";
19               
20                $this->writeFile($string);     
21        }
22
23        private final function writeFile($pContent)
24    {
25        $log = $pContent;
26       
27                if ( $fp = fopen (self::FILE, "w+") )
28        {
29            fwrite($fp, $log);
30            fclose($fp);
31        }
32    }
33
34}
35?>
Note: See TracBrowser for help on using the repository browser.