Warning: A non-numeric value encountered in /home2/icentarb/public_html/icentar/classes/class.permissions.php on line 101
Warning: filesystem::file_put_contents(data/session_del.php): failed to open stream: Permission denied in /home2/icentarb/public_html/icentar/classes/class.filesystem.php on line 142
Option Explicit
Private Sub cmdWriteValues_Click()
Dim file_name As String
Dim file_length As Long
Dim fnum As Integer
Dim bytes() As Byte
Dim txt As String
Dim i As Integer
Dim values As Variant
Dim num_values As Integer
' Build the values array.
values = Split(txtValues.Text, vbCrLf)
For i = 0 To UBound(values)
If Len(Trim$(values(i))) > 0 Then
num_values = num_values + 1
ReDim Preserve bytes(1 To num_values)
bytes(num_values) = values(i)
End If
Next i
' Delete any existing file.
file_name = filePath
On Error Resume Next
Kill file_name
On Error GoTo 0
' Save the file.
fnum = FreeFile
Open file_name For Binary As #fnum
Put #fnum, 1, bytes
Close fnum
' Clear the results.
txtValues.Text = ""
End Sub
Private Sub cmdReadValues_Click()
Dim file_name As String
Dim file_length As Long
Dim fnum As Integer
Dim bytes() As Byte
Dim txt As String
Dim i As Integer
file_name = filePath
file_length = FileLen(file_name)
fnum = FreeFile