This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Function dtTableToCSV(dt As DataTable, filename As String, Optional headers As Boolean = True, Optional delim As String = ",") | |
Dim txt As String | |
Dim fileloc As String = filename + ".csv" | |
If File.Exists(fileloc) Then | |
File.Delete(fileloc) | |
End If | |
Dim n = 0 | |
If headers = True Then | |
For Each column As DataColumn In dt.Columns | |
If n = 0 Then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function uploadMedia($file) | |
{ | |
$target_url = "https://telegra.ph/upload"; | |
$file_name_with_full_path = $file; | |
if (function_exists('curl_file_create')) { // php 5.5+ | |
$cFile = curl_file_create($file_name_with_full_path); | |
} else { // | |
$cFile = '@' . realpath($file_name_with_full_path); |
OlderNewer