Results 1 to 3 of 3

Thread: Creating a csv file in cache directory

  1. #1
    edanb is offline Senior Member
    Join Date
    Dec 2008
    Posts
    25

    Default Creating a csv file in cache directory

    I'm creating a custom report and want to put an excel version of the file in the cache/csv directory.

    Is there a variable or function that will give me the sugarcrm root directory, so that I can put the file in say $sugar_root/cache/csv?

    Thanks!

  2. #2
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: Creating a csv file in cache directory

    The sugar_root is always the current directory in any action in SugarCRM so simply accessing "cache/csv/filename.csv" will work. Just make sure that sugar_root/cache/csv exists.

    M
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

  3. #3
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: Creating a csv file in cache directory

    PS: You can get the actual sugar_root folder with this but it really is not needed.
    PHP Code:
    $sugar_root dirname($_SERVER["SCRIPT_FILENAME"]); 
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. What's in the cache/ directory?
    By SanderMarechal in forum Developer Help
    Replies: 11
    Last Post: 2010-01-04, 08:48 AM
  2. Cache directory doesn't come with 4.5.1g release
    By fredcohrs in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2007-10-28, 08:53 AM
  3. sorting through cache directory.
    By jenjen2 in forum Help
    Replies: 0
    Last Post: 2007-10-01, 05:59 PM
  4. pls help clarify cache directory?
    By dsga1 in forum Help
    Replies: 1
    Last Post: 2006-10-17, 07:55 PM
  5. Changing permissions on /cache/xml directory: is it right?
    By magesor in forum General Discussion
    Replies: 2
    Last Post: 2005-11-14, 08:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •