ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Save a .csv file to deskto

September 07, 2012 11:55am

Subscribe [1]
  • #1 / Sep 07, 2012 11:55am

    venkdevelop

    5 posts

    Hello,

    I am developing a script using PHP to
    save a file to desktop as .csv file.

    I found this code sample from PHP Manual.

    <?php
    
    $list = array (
        array('aaa', 'bbb', 'ccc', 'dddd'),
        array('123', '456', '789'),
        array('"aaa"', '"bbb"')
    );
    
    $fp = fopen('file.csv', 'w');
    
    foreach ($list as $fields) {
        fputcsv($fp, $fields);
    }
    
    fclose($fp);
    ?>

    I created file.csv on my desktop.
    My issue is I cannot find the correct path to open the file
    on the desktop and, write and save. ($fp = fopen(‘file.csv’, ‘w’))

    Should I have to show the path to server where I
    stored my web site and then to desk top?

    Can somebody guide me?

    Thank you very much.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases