SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: generate file

  1. #1
    SitePoint Member pppswing's Avatar
    Join Date
    Jul 2004
    Location
    Tallinn
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow generate file

    Hello,
    I would like to générate a css file and I wonder how I could send it. cause generating html is ok for php. but I wonder what name you have my script, if I put a header, This is like making a pdf and sending it. I wonder how can I do that, I mean I know how to create my ccs or pdf, but I dont know how the browser ask for such files and What I should do to make it work.

    Thanks

  2. #2
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in html

    <link rel="STYLESHEET" type="text/css" href="style.php">

    in style php

    header("Content-type: text/css");
    // print your css stuff

    should work

  3. #3
    SitePoint Member pppswing's Avatar
    Join Date
    Jul 2004
    Location
    Tallinn
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you think I can put the result in cache or not, because site.php will output different css files depending on user preference and default configuration of part of the web site for guest user.

  4. #4
    SitePoint Member pppswing's Avatar
    Join Date
    Jul 2004
    Location
    Tallinn
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apart header(), ob_start(), ob_get_length(), ob_end_clean(), What are the functions I should know to deliver correctly output.

  5. #5
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > What are the functions I should know

    generally speaking, none.

    Code:
    <?php 
    header (whatever);
    ?>
    our output here

  6. #6
    SitePoint Member pppswing's Avatar
    Join Date
    Jul 2004
    Location
    Tallinn
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you know any tutorial to use correctly the header parameters when we sent output? content , location, ... something that explain this things quickly and nicely better that the RFC on http.

  7. #7
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  8. #8
    SitePoint Member pppswing's Avatar
    Join Date
    Jul 2004
    Location
    Tallinn
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks but, I've already read it.

    What I want is to master the output of file like css of pdf.
    For example, I wonder If a "Content-Disposition" is necessary when a browser request a css.
    Cause this param is inline or attachement but with a css it's not inline not really attached. What should I put?


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
  •