Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-02-2012, 03:19 PM   PM User | #1
durangod
Senior Coder

 
Join Date: Nov 2010
Posts: 1,191
Thanks: 217
Thanked 31 Times in 30 Posts
durangod is on a distinguished road
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..
durangod is offline   Reply With Quote
Old 12-02-2012, 03:58 PM   PM User | #2
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,667
Thanks: 46
Thanked 456 Times in 444 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
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 ).
__________________
Please don't be rude: Put your php code in [php][/php] tags. It is a sticky topic at the top of the forum and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is online now   Reply With Quote
Users who have thanked tangoforce for this post:
durangod (12-02-2012)
Old 12-02-2012, 04:09 PM   PM User | #3
durangod
Senior Coder

 
Join Date: Nov 2010
Posts: 1,191
Thanks: 217
Thanked 31 Times in 30 Posts
durangod is on a distinguished road
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
durangod is offline   Reply With Quote
Old 12-02-2012, 04:17 PM   PM User | #4
durangod
Senior Coder

 
Join Date: Nov 2010
Posts: 1,191
Thanks: 217
Thanked 31 Times in 30 Posts
durangod is on a distinguished road
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.
durangod is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:13 PM.


Advertisement
Log in to turn off these ads.