graduation time to the current time$year = Floor ($second/3600/24/365); Convert the number of years from this timestamp$temp = $second-$year *365*24*3600; Remove the number of seconds from this timestamp for the whole year, and the number of seconds left in the month$month =floor ($temp/3600/24/30); Convert Moon number from this time stamp$temp = $temp-$month *3
How can I verify the cookie? how can I verify the cookie?
Mysql_select_db ("dhbase", $ conn );
$ SQL = "select * from dh_admin where uname = '$ lname' and upass =' $ ckpass' and work = 1 ";
$ Result = mysql_query ($ SQL, $ conn );
If (mysql_num_rows ($ result) {
Echo "incorrect account information ";
Exit;
}
Else
{
$ Row = mysql_fetch_array ($ result );
$ Lid = $ row ["id"];
$ Ltime = date ('Y-m-d h: I: S', time ());
$ User_IP = @ ($ _ SERVER ["HTTP_VIA"])? $ _ SERVER ["HTTP_X_FORWARDED_FOR"]: $
Using the Spymemcached client, the Wireshark catches the packet and sees the memcached command more clearly.Let's start with a simple demo: PackageSPYMC;Importjava.io.IOException;Importjava.net.InetSocketAddress;ImportNet.spy.memcached.CASResponse;ImportNet.spy.memcached.CASValue;Importnet.spy.memcached.MemcachedClient; Public classTESTSPYMC { Public Static voidMain (string[] args)throwsIOException {memcachedclient C=NewMemcachedclient (NewInetsocketaddress ("aliyun.9game.cn", 11211)); C.set ( "
,DSKP4)If InStr (DskP5, stdinput) Then call Network (DISK5,SIZE5,DSKP5)
Sub Network (DISKS,SIZES,DSKPS)Snow=nowTodoDim A' WScript.Echo ' Run Ts\3600 ' Hours ' (TS MoD 3600) \60 "Minutes" (TS MoD 3600) MoD 60 "SEC"Set A = WMI. ExecQuery ("select * from Win32_perfrawdata_perfdisk_physicaldisk Where name= '" DskPs "")For each B in AR1 = B.diskreadbytespersecW1 =
$HTTP _cookie_vars["user" or $_cookie["user". When a cookie is sent, the value of the cookie is automatically URL-coded. The URL is decoded when it is received. If you do not need this, you can use Setrawcookie () instead.
example, PHP settings and get cookies
The code is as follows
Copy Code
Setcookie (' MyCookie ', ' value ');function prototypes: int Setcookie (string name,string value,int expire,string path,string Secure)Echo ($mycookie);Echo ($HTTP _cookie_vars
the two, divided by 1000 into the number of seconds var dif_d = Math.floor (dif/(3600*24));Number of days =[difference total seconds/day total seconds (60 seconds *60 * 24 hours)] var dif_h = Math.floor ((dif-dif_d*3600*24)/3600);The difference in hours =[(total number of seconds left after the number of days)/total seconds in one hour] var dif_m = Math.fl
could do the following.
*/
Channel No_info_messages {
Syslog
Severity notice;
};
Category load {no_info_messages;};
/*
* You can also define category "Default"; It gets used when no
* "category" statement has been given for a category.
*/
Category Default {
Default_syslog;
Moderate_debug;
};
};
13, in the/var/named/to generate/etc/named.conf tags in the file: Rd.xxx.com.db, the content is as follows, you need to modify and adjust the appropriate parts:
; Authoriative Data for rd.xxx.c
;Calculates the number of milliseconds between the two, divided by 1000 into the number of seconds var dif_d = Math.floor (dif/(3600*24));Number of days =[difference total seconds/day total seconds (60 seconds *60 * 24 hours)] var dif_h = Math.floor ((dif-dif_d*3600*24)/3600);The difference in hours =[(total number of seconds left after the number of days)/total
These methods are written at the time of the project, some may not be well written, but they can be collected as a date formatting tool.varDateutils = {/** * Formatted date * @param date * @returns {string} */Getformatday:function (date) {varDateTime;varDateFormat;//Var flag=date.indexof ("-"); if(typeof date = ="Object") {DateTime =NewDate (date); }Else{DateTime =NewDate (Date.replace (/-/g,'/')); }//----Change the time format to such as 2014-01-01---- varMon2 = (number (Datetime.
/3600); // calculates the total number of hours
Echo ceil ($ cle/3600/24); // returns the total number of days
*/
/* Ceil () function, which is an integer in the next method */
$ D = cell ($ cle/3600/24 );
$ H = cell ($ cle % (3600*24)/3600); // % obtain the remainder
$ M =
//////by the number of seconds to get the date a few days a few hours ... //////Number of seconds///0: Converted with seconds, 1: No seconds after conversion///a few days, hours, minutes, seconds . Public Static stringParsetimeseconds (intTinttype) {stringR ="";intDay , hour, minute, second;if(T >=86400)//days,{ Day= Convert.ToInt16 (t/86400); hour= Convert.ToInt16 ((t%86400) /3600); minute= Convert.ToInt16 ((t%86400%
would perform housekeeping procedure (in hours).# housekeeping is removing unnecessary information from the history, alert, and alarms tables.## Mandatory:no# range:1-24# Default:#说明: How many hours to clean up the history of the agent-side database, alert, and alarms to keep the proxy-side database lightweight, it is recommended to keep the default# Housekeepingfrequency=1# # Option:maxhousekeeperdelete# The table "housekeeper" contains "tasks" for housekeeping procedure in the format:# [House
';$end=strtotime('2018-8-16 00:00:00');$d=$end-$now;$y=floor($d/3600/24/30/12);$m=($d/3600/24/30)%12;$dt=($d/3600/24)%30;echo "距世界杯还有{$y}年{$m}个月{$dt}天";
How can you write if you have an error in writing this month?Does this error have an effect?
Reply content:
';$end=strtotime('2018-8-16 00:00:00');$d=$end-$now;$y=floor($d/
The blog calendar implementation code in php shares a blog calendar implementation code in php. it is very easy to query the database, as long as you modify the field name to be the same as that in your database, the instance code is as follows:
Function calendarnew ($ starttime = 0 ){
Global $ db, $ tablepre, $ timestamp, $ site_timeoffset, $ site_dateformat, $ curtime;
$ Starttime = $ starttime? $ Starttime: $ timestamp;
$ Curtime = gmdate ($ site_dateformat, $ starttime + $ timeoffset *
The following is the implementation code. if you forget where the code was obtained, it may be Discuz! The personal space is now posted to share with you the following implementation code. if you forget where to find the code, it is probably Discuz! In the personal space
Now post it for everyone to share
Function calendarnew ($ starttime = 0 ){
Global $ db, $ tablepre, $ timestamp, $ site_timeoffset, $ site_dateformat, $ curtime;
$ Starttime = $ starttime? $ Starttime: $ timestamp;
$ Curti
Cookie is used to store information in the client browser. We can use cookies to record user-related information. For example, the webmaster's statistical code is implemented based on cookies and ip addresses, the following describes how to use and pay attention to cookies.
PHP cookie usage
The Code is as follows:
Copy code
Setcookie ('mycooker', 'value ');// Function prototype: int setcookie (string name, string value, int expire, string path, string domain, int secure)E
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.