473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Same script, but work in some server and doesn't work in some server.

15 Byte
[PHP]<?php

$range = split(',', '2008-11-1>2008-11-30=123,2008-12-1>2008-12-31=222,');
for ($y=0; $y<(count($range)-1); $y++){
$equalto = explode('=',$range[$y]);
$splitagain = split('>',$equalto[0]);
for ($s=strtotime($splitagain[0]); $s<(strtotime($splitagain[1])+10); $s=$s+(60*60*24))
{
$money[$s]=$equalto[1];

}

}

$kk = $money[1225497600]; //1225497600 is the time stamp within the for loop
if ($kk==''){echo 'what happen??';}
else {echo $kk;}
?>[/PHP]


it is the server it works http://kamchihau.meibu.com/testcalender.php

however in this server it goes. http://www.yagit.com.hk/testcalender.php
Jun 24 '08 #1

✓ answered by Markus

split() should be used with regular expressions.

split

(PHP 4, PHP 5)

split — Split string into array by regular expression

3 1241
Markus
6,050 Expert 4TB
split() should be used with regular expressions.

split

(PHP 4, PHP 5)

split — Split string into array by regular expression
Jun 24 '08 #2
hsriat
1,654 Expert 1GB
Use explode instead.
Jun 24 '08 #3
wesley1970
15 Byte
I know the reason............ Time Zone.............. i guess i have to rewrite the program.......... thankssssss...
Jun 24 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: cmac | last post by:
Greetings, I love the HV menu and have been uning it for a long time. I recently was asked how to make a page for my wife (wedding coming up soon) and my wife would like to have 2 ways to...
6
by: bissatch | last post by:
Hi, I have been tryin to run free dhtml code from a web page. The web page is: http://dynamicdrive.com/dynamicindex14/pixelate.htm When I load the page above it opens as normal and the...
6
by: Ruslan | last post by:
Hello, I have to project: one ASN.NET project and another - Web Service in the same solution. I want to use the same web.config and global.asax files. Does it possible?
5
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me...
9
by: Wayne Wengert | last post by:
I am attempting to incorporate some techniques I found in an MSDN article into one of my aspx pages. It basically adds a new class that Inherits from the System.Web.UI.Page and includes some new...
3
by: Magnus Blomberg | last post by:
Hello! I have a client javascript that generates a string (like below). This string should then be used by server code (in this case a function called run). <script language=javascript>...
7
by: Alessandro Benedetti | last post by:
Hi. I'm calling two methods of a .NET Webservice (A) from another Webservice (B). The A Webservice is made like this: public class WSA: System.Web.Services.WebService { private int X = 0;
19
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
4
by: dbee | last post by:
Right. I've got a really, really annoying/difficult/time consuming problem with my development environment. I'm using django to build a web app with paypal integration. My server is hosted...
3
by: steven.rojas | last post by:
I have a chat application based on PHP and Flash, I know that is necessary execute the socket server script from the console (#!/usr/ local/bin/php -q), but my problem is that I don't have SSH...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.