i'm new to this lovly forum im a noob in php and i need soem help please
i have this code
- Code: Select all
$file = 'data.log';
$handle = fopen($file, 'w') or die('Cannot open file: '.$file);
$data = "";
foreach ($_POST as $key => $value)
$data = $data.$value."\n";
this code is for receving a HTTP post reqest and write its content to a file called "data.log"
it is working fine but i want to make a change in it so it recives the request and split it for 2 pices . the splitter is $ mark
the string before the $ mark is the file name and after the $ mark is the data
EX of the request:
and i must see in my file manager
inside it: hiimatextfile
the $ sign must not be mentioned from both the name and the data
any 1 can help?