PHP code example of putyy / table-export-csv

1. Go to this page and download the library: Download putyy/table-export-csv library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

putyy / table-export-csv example snippets


...
$grid->tools(function ($tools) {
    // 1导出当前页 2导出全部
    $tools->append(new \Pt\WebExportCsv\WebExportCsvTool(1));
    $func = <<<HTML
        <script type="application/javascript">
            function currentPageColumnHandle(td){
                return "666";
            }
        </script>
    HTML;
    $tools->append(new \Pt\WebExportCsv\WebExportCsvTool(2, $func));
});
...