RE: [HELP] Save File Fialog/Stream Writer 02-23-2011, 08:44 AM
#3
(02-23-2011, 07:23 AM)Coder-san Wrote: Just remove the File.Create.
Here is the whole code:
Code:Dim saveDialog As New SaveFileDialog Dim aStream As IO.Stream saveDialog.Filter = "php files (*.php)|*.php|All files (*.*)|*.*" If saveDialog.ShowDialog = 1 Then aStream = saveDialog.OpenFile() Using sw As IO.StreamWriter = New IO.StreamWriter(aStream) sw.WriteLine("<?php") sw.WriteLine("$action = $_GET['action'];") sw.WriteLine("$data = $_GET['data'];") sw.WriteLine("if ($action == """"delete""""){") sw.WriteLine("unlink(""""log.txt"""");") sw.WriteLine("$new = fopen(""""log.txt"""", 'a');") sw.WriteLine("fclose($new);") sw.WriteLine("}") sw.WriteLine("if ($action == """"write""""){") sw.WriteLine("$open = fopen(""""log.txt"""", 'a');") sw.WriteLine("fwrite($open, $data.""""\n"""");") sw.WriteLine("fclose($open);") sw.WriteLine("}") sw.WriteLine("?>") sw.Close() End Using End If
Thanks

And, the """"write"""", how does that work?
thanks
Staff will never ever ask you for your personal information.
We know everything about you anyway.
We know everything about you anyway.




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)