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
<form action="" method="post" accept-charset="utf-8" enctype="multipart/form-data"> | |
<input type="file" name="file"> | |
<input type="submit" name="btn_submit" value="Upload File" /> | |
<?php | |
if(ISSET($_POST['btn_submit'])){ | |
$file = fopen($_FILES['file']['tmp_name'], 'r+'); | |
while (($column = fgetcsv($file, 10000, ";")) !== FALSE) { | |
print_r($column);die(); |
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 | |
$databasehost = "localhost"; | |
$databasename = "test"; | |
$databasetable = "sample"; | |
$databaseusername ="test"; | |
$databasepassword = ""; | |
$fieldseparator = ","; | |
$lineseparator = "\n"; | |
$csvfile = "filename.csv"; |
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 | |
/** | |
* Copyright © 2018 . All rights reserved. | |
*/ | |
namespace Test\Test\Setup; | |
use Magento\Customer\Model\Customer; | |
use Magento\Customer\Setup\CustomerSetupFactory; | |
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory; | |
use Magento\Framework\Setup\InstallDataInterface; |
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 | |
namespace TestModule\TestDate\Model\Config\Source; | |
use Magento\Framework\App\ObjectManager; | |
use Magento\Store\Model\StoreManagerInterface; | |
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource; | |
class TestDate extends AbstractSource | |
{ |
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
name | price | |
---|---|---|
Skewers - Bamboo | 108.31 | |
Carbonated Water - Strawberry | 193.50 | |
Thermometer Digital | 243.78 | |
Wine - Mondavi Coastal Private | 248.55 | |
Island Oasis - Mango Daiquiri | 123.18 | |
Anisette - Mcguiness | 230.41 | |
Watercress | 231.60 | |
Puree - Guava | 45.76 | |
Beans - Navy, Dry | 214.07 |