Помогите плис...

Тема в разделе "PHP для новичков", создана пользователем luxury, 9 авг 2012.

  1. luxury

    luxury Активный пользователь

    С нами с:
    9 авг 2012
    Сообщения:
    1
    Симпатии:
    0
    В общем задача следующая: есть сервер на ubuntu apache2 + php, samba есть шара с файлами *csv, а именно sale_001.csv до sale_073.csv. есть скрипт чтения csv файлов для отображения на странице.
    Нужно на странице сделать календарь, при щелчке на дату читался фаил именно с той датой на которую щелкнул.

    Как это решить ребята ?
    Помогите пожалуйста !!!



    <?php
    /*/-------------------------------------------------------------------\
    | Original Name : csvview.php |
    | Author : Neil Maskell |
    | Function : Reads a specified CSV file (Comma seperated) and |
    | converts it into a readable HTML table. |
    | |
    | You could set up a html form with an input field |
    | called filename. Then use csvview.php as the action. |
    | |
    | the reason cache is being disabled is because if you |
    | update the csv file the cache doesnt realise and shows|
    | an older version of the information. |
    | |
    | The CSV files should (and normally are) in the format:|
    | field1,field2,filed3,filed4 |
    | field1,field2,field3,field4 |
    \-------------------------------------------------------------------/

    */
    //
    $filename = "sale_001.csv"; // 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
    */
     
  2. Ke1eth

    Ke1eth Активный пользователь

    С нами с:
    16 мар 2012
    Сообщения:
    1.072
    Симпатии:
    11
    Адрес:
    заблудилса
    Заходи на бубунту putty или ручками к консоли, делай man smbget, читай манул,
    быстрое решение:
    1) system или exec просить smbget кинуть в /tmp файл, который попросил пользователь
    2) читать из /tmp