Coding Trickz
Saturday, April 7, 2012
Get Current File Name PHP
Get Current File Name
<?
php $pageName
=
basename
(
$_SERVER
[
PHP_SELF
]);
?>
Potential use:
<body id="body_
<?
php echo $pageName
;
?>
">
Append ID to body to do different CSS styles on different pages.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment