note 118152 added to function.parse-ini-file

From: Date: Thu, 15 Oct 2015 14:00:48 +0000
Subject: note 118152 added to function.parse-ini-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-203960@lists.php.net to get a copy of this message
public function install(){ $config['iPROTECT'] = "<?php /*<!--"; $config['iamtheHOST']=(isset( $_POST['HOST'] )) ? addslashes($_POST['HOST'] ) : '' ; $config['iamtheDATABASE']=(isset($_POST['DATABASE'] )) ? addslashes($_POST['DATABASE'] ) : '' ; $config['iamtheUSER']=(isset($_POST['USER'] )) ? addslashes($_POST['USER'] ) : '' ; $config['iamthePASSWORD']=(isset($_POST['PASSWORD'] )) ? addslashes($_POST['PASSWORD'] ) : '' ; $config['PROTECTIONI'] = "-->*/"; if(isset($_POST['save'])){ if($this->connect($config['iamtheHOST'],$config['iamtheDATABASE'],$config['iamtheUSER'],$config['iamthePASSWORD'])){ $this->write_file($config); return; } } ...form issues or print } function write_file($assoc_arr){ $content = ""; foreach ($assoc_arr as $key=>$elem){ $content .= ''.$key.' = "'.$elem.'"'." \n"; } //print $content; if (!$handle = fopen($this->configfilename, 'w')) { return false; } $success = fwrite($handle, $content); fclose($handle); return $success; } so write the lines PROTECTION = "<?php /*<!--" iamtheHOST = "***???***" iamtheDATABASE = "***???***" iamtheUSER = "***???***" iamthePASSWORD = "***???***" PROTECTIONI = "-->*/" ---- Server IP: 72.52.91.14 Probable Submitter: 80.200.42.217 ---- Manual Page -- http://php.net/manual/en/function.parse-ini-file.php Edit -- https://master.php.net/note/edit/118152 Del: integrated -- https://master.php.net/note/delete/118152/integrated Del: useless -- https://master.php.net/note/delete/118152/useless Del: bad code -- https://master.php.net/note/delete/118152/bad+code Del: spam -- https://master.php.net/note/delete/118152/spam Del: non-english -- https://master.php.net/note/delete/118152/non-english Del: in docs -- https://master.php.net/note/delete/118152/in+docs Del: other reasons-- https://master.php.net/note/delete/118152 Reject -- https://master.php.net/note/reject/118152 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203960) next »