Results 1 to 3 of 3
Thread: *.csv
Hybrid View
-
10th February 2009 16:11 #1Registered User
Join Date: Feb:2008
Location:
Posts: 46
*.csv
!!!
.csv html . http://mostbg.com/Pricelist/PricelistBGN.csv . Exel , ",,," , html. GOOGLE PHP . .
.
PHP Code:Simple <b style="color:black;background-color:#ffff66">CSV</b> to <b style="color:black;background-color:#a0ffff">HTML</b> Table
<?<b style="color:black;background-color:#99ff99">php</b>
*/
//
$filename = ""; // File to open. quote out this variable if you are using a form to link to this script.
/*
No cache!!
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
/*
End of No cache
*/
function viewlog($filename) {
$fp = fopen($filename,"r");
$file = fread($fp,65535);
$replaced = eregi_replace(",", "<td>", $file);
$replaced2 = eregi_replace("\n", "<tr><td>", $replaced);
$replaced3 = eregi_replace("\r", "<tr><td>", $replaced2);
fclose($fp);
return $replaced3;
}
echo "<<b style="color:black;background-color:#a0ffff">html</b>><head><base href=\"./\"><title><b style="color:black;background-color:#ffff66">CSV</b> File Viewer</title></head><body bgcolor=silver>";
// Start the table definition of your choice
echo "<table border=0 bordercolor=black cellspacing=0 cellpadding=5 width=100% style='font-size:10pt'>";
echo viewlog($filename);
echo "</table></body></<b style="color:black;background-color:#a0ffff">html</b>>";
exit;
?>
-
11th February 2009 12:55 #2
.html http://mostbg1.com/most/PriceList.aspx? . , .
Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19
-
11th February 2009 13:00 #3
:
HTML Code:<?php $filename = "PricelistBGN.csv"; header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); function viewlog($filename) { $fp = fopen($filename,"r"); $file = fread($fp,65535); $replaced = eregi_replace(",", "<td>", $file); $replaced2 = eregi_replace("\n", "<tr><td>", $replaced); $replaced3 = eregi_replace("\r", "<tr><td>", $replaced2); fclose($fp); return $replaced3; } echo "<table border=\"0\" bordercolor=\"black\" cellspacing=\"0\" cellpadding=\"1\" width=\"100%\" style=\"font-size:10pt\">"; echo viewlog($filename); echo "</table></body>"; exit; ?>
, :
, ,HTML Code:<?php $filename = "http://91.198.119.1/Pricelist/PricelistBGN.csv"; header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); function viewlog($filename) { $fp = file_get_contents($filename); $replaced = eregi_replace(",", "<td>", $fp); $replaced2 = eregi_replace("\n", "<tr><td>", $replaced); $replaced3 = eregi_replace("\r", "<tr><td>", $replaced2); return $replaced3; } echo "<table border=\"0\" bordercolor=\"black\" cellspacing=\"0\" cellpadding=\"1\" width=\"100%\" style=\"font-size:10pt\">"; echo viewlog($filename); echo "</table></body>"; exit; ?>
, 2- most, , , 1-
2- ...
Last edited by runtime; 11th February 2009 at 13:34.




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in