scriptygoddess

Archive for July, 2007

13 Jul, 2007

Use PHP to get the current page/file name

Posted by: Jennifer In: PHP

I probably already have this posted somewhere, I know I use it a ton but always have to look it up for the exact syntax. Here's how you can get the name of the current file (ie. if your file is "aboutus.php" this will echo "aboutus.php")
<?php
$currentFile = $_SERVER["PHP_SELF"];
$parts = Explode('/', $currentFile);
echo $parts[count($parts) - 1];
?>
I've [...]

10 Jul, 2007

Warning: reference to undefined property

Posted by: Jennifer In: Javascript

The main reason I've seen that error come up in javascripts is because a form name or field name has been misspelled somewhere. Tonight, while I combed over every name until my vision was crossed – I discovered a new reason why you might get this error:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
I was working with CubeCart [...]

06 Jul, 2007

Working with CubeCart

Posted by: Jennifer In: cubecart

As I wrote in the comments on this post, I have a new project that needed a shopping cart again. I tried Zen Cart again, and again I quickly remembered why I hated it so much. If I ever even so much as think of trying that package, just hand me the spork to remind [...]

04 Jul, 2007

Email fiasco

Posted by: Jennifer In: Announcements

Something strange happened to my email address (the one that receives comment notifications from this site, of course) – it just sort of disappeared off the server. I've set it up again, so everything should be fine now – but if you've tried to contact me and I haven't responded, or if you left a [...]


Featured Sponsors


  • Michael: You can use get_header(2) in your case. The filename of your custom header has to be header-2.php. The problem with include(your_file.php) is, all
  • cliff: hi wonder if you can help me, pls i designed www.kouga.mobi using dreamweaver CS3 and now want to make the phonenumbers into links so that if you
  • jerey: how do i rewrite this because it tried RewriteEngine on #Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL

About


Advertisements