Need help with REGEX

  • Hacker007
  • Proficient
  • Proficient
  • User avatar
  • Joined: Apr 07, 2004
  • Posts: 371
  • Loc: Riverside, CA
  • Status: Offline

Post August 13th, 2009, 9:52 pm

I tested it using:
http://www.solmetra.com/scripts/regex/index.php

And it only returns true if it matches, but altering the file name to be sometime like asdsf.php it will return false - this whether or not the dots are escaped. But if you want to evade that issue entirely, why not use basename($_SERVER['PHP_SELF'], ".php")

AFter more testing, I think I would suggest for you to also echo basename($_SERVER['PHP_SELF']) to make sure it is resulting to what you want it to be.
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." -Martin Golding
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 13th, 2009, 9:52 pm

Post Information

  • Total Posts in this topic: 16 posts
  • Users browsing this forum: No registered users and 150 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.