root/.htaccess profile.php?uname=bikash it will show /bikash ------------------------------------ RewriteEngine On RewriteBase / RewriteRule ^confirmemail/(.*) confirmemail.php?code=$1 RewriteRule ^resetpassword/(.*) resetpassword.php?code=$1 RewriteRule ^resendconfirmation/(.*) resendconfirmation.php?userid=$1 RewriteRule ^widget$ widget.php RewriteRule ^profile/(.*)/(.*) redirect.php?id=$1&username=$2 RewriteRule ^([^/.]+)(\/)?$ profile.php?uname=$1 # Turn off mod_security filtering. SecFilterEngine Off # The below probably isn't needed, # but better safe than sorry. SecFilterScanPOST Off ------------------------------------------------------------- if you helpful my code please donate some few amount to developing and free to post. -------------------------------------------------------------
unlink() is used to delete physical files...So lets say you have foo.txt somewhere on your server... unlink(foo.txt) would delete it. unset() is used to null out the value of a given variable. So for instance: x = 200; echo(x); // 200 unset(x); echo(x); // null The difference between the functions unlink and unset unlink() is a function for file system handling. It will simply delete the file in context. Example for unlink() : <?php $fh = fopen('test.html', 'a'); fwrite($fh, '<h1>Hello world!</h1>'); fclose($fh); unlink('test.html'); ?> unset() is a function for variable management. It will make a variable undefined. (or) Unset () is used to destroy a variable in PHP. In can be used to remove a single variable, multiple variables, or an element from an array. It is phrased as Unset ($remove). Also Known As: Unset Variable, Destroy Variable Example for unset() : <?php // remove a single variable unset($a); // remove a singl...
Regular Expression, commonly known as RegEx is considered to be one of the most complex concepts. However, this is not really true. Unless you have worked with regular expressions before, when you look at a regular expression containing a sequence of special characters like /, $, ^, \, ?, *, etc., in combination with alphanumeric characters, you might think it a mess. RegEx is a kind of language and if you have learnt its symbols and understood their meaning, you would find it as the most useful tool in hand to solve many complex problems related to text searches. Just consider how you would make a search for files on your computer. You most likely use the ? and * characters to help find the files you're looking for. The ? character matches a single character in a file name, while the * matches zero or more characters. A pattern such as 'file?.txt' would find the following files: file1.txt filer.txt files.txt Using the * character inst...
Comments
Post a Comment