Wiki - Php

Category about Php

URL Request Handling

SEO Friendly URLs with PHP

ModRewrite needs to be enabled in apache2 by executing: a2enmod rewrite Modify your HTaccess File like this if index.php is your main php File: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?i=$1 [L,QSA] For example, if the user enters the URL yourdomain.ending/wik...

String Operations

Check if String exists in String

Here code to check if a string exists in another string! $string = 'This is a String'; if (strpos($string , 'This') !== false) { echo 'true'; # STRING CONTAINS WORD "This" } else { # String not found inside $string } ...

Replace in a String

Example of replacing a sign in a string (works with more than one sign) $newstring = str_replace("TEXT", "NEW TEXT", $initialstring); ...

A64 | H62
This Website is using Session Cookies for Site Functionality and AWStats.