Back from our fabulous family holiday today. I have also been reading a little about design. It's proved quite interesting and I think I will continue and you will probably see some entries containing this new knowledge.
I have also made some progress with my own website, http://www.effectivewebdesigns.co.uk, including a mobile version which I am still perfecting. I haven't been able to develop the site for a while, but now I'm also going to use it to host some demo sites of the blog entries, so you will see them appearing first in older posts. then I'll gradually catch up.
I use Google Chrome most of the time. Then I test on IE and Opera. I came across this useful extension for Chrome, I hope you like it too.
Showing posts with label extension. Show all posts
Showing posts with label extension. Show all posts
Tuesday, 3 May 2011
Thursday, 18 November 2010
PHP to get current file name without the extension
This little function will return the file name which calls it minus the .php extension.
<?php
function getCurrentFile()
{
$currentFile = $_SERVER["SCRIPT_NAME"];
$parts = Explode('/', $currentFile);
$currentFile = substr($parts[count($parts) - 1],0,-4);
return $currentFile;
}
?>
<?php
function getCurrentFile()
{
$currentFile = $_SERVER["SCRIPT_NAME"];
$parts = Explode('/', $currentFile);
$currentFile = substr($parts[count($parts) - 1],0,-4);
return $currentFile;
}
?>
Subscribe to:
Posts (Atom)