note 99001 added to security.hiding

From: Date: Wed, 21 Jul 2010 16:03:17 +0000
Subject: note 99001 added to security.hiding
Groups: php.notes 
Request: Send a blank email to php-notes+get-171019@lists.php.net to get a copy of this message
It's a good idea to "hide" PHP anyway so you can write a RESTful web application. Using Apache Mod Rewrite: RewriteEngine On RewriteRule ^control/([^/]+)/(.*)$ sitecontroller.php?control=$1&query=$2 You then use a function like the following as a way to retrieve data (in a zero indexed fashion) from the $_GET superglobal. <?php function myGET() { $aGet = array(); if(isset($_GET['query'])) { $aGet = explode('/', $_GET['query']); } return $aGet; } ?> This is only a really basic example of course - you can do a lot with Mod Rewrite and a custom 'GET' function. ---- Server IP: 213.229.106.14 Probable Submitter: 86.54.22.114 ---- Manual Page -- http://www.php.net/manual/en/security.hiding.php Edit -- https://master.php.net/note/edit/99001 Del: integrated -- https://master.php.net/note/delete/99001/integrated Del: useless -- https://master.php.net/note/delete/99001/useless Del: bad code -- https://master.php.net/note/delete/99001/bad+code Del: spam -- https://master.php.net/note/delete/99001/spam Del: non-english -- https://master.php.net/note/delete/99001/non-english Del: in docs -- https://master.php.net/note/delete/99001/in+docs Del: other reasons-- https://master.php.net/note/delete/99001 Reject -- https://master.php.net/note/reject/99001 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#171019) next »