Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> What Kind Of Files Are .lib
itssami
post Apr 9 2006, 03:38 PM
Post #1


Super Member
*********

Group: Members
Posts: 258
Joined: 13-November 05
Member No.: 14,234



I want to know , if we use some pre-made php script , there are often many files with other extension..i have been watching many times some files names ".lib" . what kind of files these are ... there's written C/C++ inline file.. why these kinds of files are needed in php scripts.. and are there some replacements for it ? (So that we can do things without it ?)... for example im pasting the coding of a file.. ban.lib ..i want to ask, why it is .lib file..why it cant be .php....

CODE
<?
function file2str($p){if($p=="") return "";
$f=@fopen($p,"r");if(!$f) return "";
$ch="";while(!feof($f)){$ch .=fgetc($f);}return $ch; }
function get_ban($p){return file2str($p);}
function def_credits($pre=""){global $DCRED_P;return @split("&",file2str($pre.$DCRED_P));}
function def_rate($pre=""){global $DRATE_P; $drate=@split("/",file2str($pre.$DRATE_P));
if((!$drate[0]) || (!$drate[1]))return 1/2;return (float)sprintf("%0.2f", $drate[1]/$drate[0]);}
function def_affi($pre=""){global $DAFFI_P;$def_affi=file2str($pre.$DAFFI_P);return $def_affi==""?20:$def_affi;}?>


Notice from mayank:
Dont forget to add CODE tag to the code you are pasting in the post

Go to the top of the page
 
+Quote Post
Inspiron
post Apr 9 2006, 04:11 PM
Post #2


Trap Grand Marshal Member
***********

Group: Members
Posts: 1,203
Joined: 25-March 05
Member No.: 4,883



I believe you can rename and change it to .php extention. It should still work because the content is just a php script regconised by the php engine. If I'm not wrong, you can actually rename and give your php scripts practically any types of extention and include into a real php file. I believe people do this so as any one who edits the script will less likely touch those files as they are usually used by many of the function in the entire program. Hence it is used as a virtually protected php script that is shared among all in the same program.
Go to the top of the page
 
+Quote Post
Spectre
post Apr 10 2006, 01:34 AM
Post #3


Privileged Member
*********

Group: Members
Posts: 873
Joined: 30-July 04
Member No.: 246



It is most likely that the program will reference the file with that extension - eg. include('file.lib'). As such, I wouldn't recommend changing the extensions unless you change all references to the files accordingly.

It makes no difference as to what extension you use (or if you use an extension at all) if the file is going to be called from within an existing script that has already been executed - it will take the file, and if it contains the appropriate tags (eg. <?php ?>), process that as code. The only potential problem is that if someone tries to access the file directly, it will not be executed, but most likely displayed as plain text, unless you have configured your server to treat that file's extension as a PHP script.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. What's Your Favorite Kind Of Food?(86)
  2. Converting Video Files From One Format To Another(6)
  3. Does Anyone Know How To Make Exe Files(19)
  4. The New And Very Good Free Host Server(13)
  5. Frog Setup(6)
  6. What Kind Of Games You Like?(19)
  7. Eclipse Exporting .jar Files(5)
  8. How To Disable "show Hidden Files And Folders" In Folder Option(12)
  9. Sharing Files And Printer Between Windows Vista And Xp(9)
  10. What Kind Of Car Do You Have?(30)
  11. Array Pointers Can Be Backwards(8)
  12. Gaining Weight (the Good Kind!)(11)
  13. 1350 Great Free Logos (jpg + Psd)(8)
  14. Jar Executable Files(3)
  15. Audio Files?(5)
  1. Naming Web Page Files(9)
  2. How Can You Get Audio Files From Itunes Videos?(1)
  3. Auto-upload Files With Filezilla And Autohotkey(0)
  4. Browse System Files In The Browser...(2)
  5. Lan Surfer In Linux(2)
  6. Firefox Temporary Media Files(0)
  7. Panasonic Lumix - Problems With Movie Files(0)
  8. How To Download Any Flv Files From Any Sites(6)
  9. Clearing Your Ie Tif(0)
  10. How To Create Pdf Files Using Free Tool(0)
  11. X Files: I Want To Believe!(2)
  12. Deny Or Grant Users Access To Files Of Choice (vista)(3)
  13. Does Anyone Know What Kind Of Dog This Is?(6)


 



- Lo-Fi Version Time is now: 11th October 2008 - 12:20 PM