
|
Home > Code snippets Code SnippetsDisplay code snippets from subcategory: PHP (7) Cookie ClassCookie Class Removing Register Globals and Magic QuotesIf you are in the situation where you can not control is register globals are on or if magic quotes are on you need an easy way to remove them. Luckily with a single include file you can remove these items. Whether you are transitioning away from them or are on a host where you can not turn them off this will help you to ensure that the variables are cleaned out. array_filterWill filter out certain element of the array you don't want Remove Invalid XML CharactersWhen you are writing out an XML document there are certain characters that are not allowed in the document. If these characters exist, you will be unable to parse the document as per the XML specification.What this function will do is take a string, remove the invalid characters and then return the string back to you to insert into an XML document. line_counttrying to work out the line count on extremly large text file can't be done by simple str_count for line breaks as you can't load the entire file into memory. this function hopfully helps with that. human_bytesDisplays bytes in the nearest manageable unit Validate file extensionThis simple function help you to validate that a file has an allowed extension. Got one? Create it now. View the most popular snippets.
|
||||||||||||
|
PHPEdit User Community, © 2008 WaterProof SARL
|
||||||||||||