Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: file naming

  1. #1
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,381
    Thanks
    264
    Thanked 32 Times in 31 Posts

    file naming

    I want to create some special files that will be used for nothing for their internal data but rather if they exist it means something. There will be quite a few of them.

    Can i create them using any extension in php and can i read them (just if exists) using any extension. Is there an extension that is normally used for such a thing. I dont want to use txt cause people have a habbit of opening those.

    It has to be something oddball and php legal of course.

    any suggestions.

    I was thinking of .uyt i googled it and it does not exist
    Last edited by durangod; 12-03-2012 at 12:25 AM.

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,314
    Thanks
    58
    Thanked 525 Times in 512 Posts
    Blog Entries
    5
    You can use any extension and just use the file_exists() function to check if they are in existence.

    When I wrote my service controller V1 years ago I use to use a file called stop.stp. If the cycling service script found it then it would stop otherwise it would carry on (then I wrote an ajax control interface instead ).
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • Users who have thanked tangoforce for this post:

    durangod (12-02-2012)

  • #3
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,381
    Thanks
    264
    Thanked 32 Times in 31 Posts
    cool thanks tango good to hear from you again. Yep im converting a expiration date based social site to a credit featured based site and its been mind boggling to say the least.

    I am using the file name because the first view of the video is charged, after that its free. so when they pay to view i just create a little file and check it later in processing to see wether to show the vid or show my image instead, works pretty slick.

    i got about an hour to go and im done with this deal, 3.5 weeks later lol.. i told him 3 to 5 weeks so i was right on the money.

    thanks so much everyone I LOVE YOU GUYS AND GIRLS SOOOOOOOOO MUCH and i have learned so much as well.

    again good hearing form you tango

    thanks

  • #4
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,381
    Thanks
    264
    Thanked 32 Times in 31 Posts
    ooops i forgot to ask, whats the best attribute to use for that in the fopen would it be (w or r) it will be in a sub dir.


  •  

    Posting Permissions

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