Php
1. How to determine if the time format is correct:
Such as: I need 20110603 such format, this format is the user to fill in, how to determine whether users fill in compliance with this specification,
Need code for reference
2. How to determine user logon permissions:
such as: After the user logs in, copy an address path to link, set to user cannot access this path, need code reference
I hope the gods are pointing out
Reply to discussion (solution)
Great God, come and show me ....
1. You can use the date control http://www.my97.net/or regular match http://hi.baidu.com/tuqin526/item/f1a0becfae508435459416ab
2. A permission table is required to record the user ID and link, and when the user accesses the link, determine if there is a corresponding user ID in the permission table
$d = ' 20110603 '; if (date (' Ymd ', Strtotime ($d)) = = $d) echo ' format correct ';
if (! $_server[' Http_referer ') die (' No access ');