http://pear.php.net/package/db
"Monty" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am trying to use fewer resources and processes when making database
> connections in my scripts, so, upon the first call to make a DB
connection,
> I store the Link Resource ID in a constant vari
I'll try to explain..
For example I have a link: "index.php?fd=car"
then the Request part looks like this:
if(isset($_REQUEST['fd'])){
$dir = ($_REQUEST['fd']);
}
But for example I have a link "index.php?fd=car&c=green"..
How to Request more then one variable if I want to get something like th
I've already a php function that outputs a file from a folder outside the www
path to a page, but I can't find a way to do this and then close the window
where it was outed. Any 1 can point me in the right direction?
Thanks,
Vicente
--
PHP General Mailing List (http://www.php.net/)
To unsubsc
What exactly does this do:
/< (?<=p|br) [^>]+ >/x
It may work, I just want to understand what it's looking for.
Thanks,
Matt
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Matt Palermo ([EMAIL PROTECTED]):
> > I have a page where I am stripping the ht
hey,
yes it would take 2 steps i made a script like this before so i know, i
stpent much time looking for it, but php doesn't get info like that because
it is running on the server and not the computer or viewer's computer
From: E.H.Terwiel <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To:
--- adwinwijaya <[EMAIL PROTECTED]> wrote:
>i just wonder, is there any way to detecting the type of field
>(like textarea, button, radio, etc) from $_REQUEST / $_POST ?
Nope.
>I need to detect that all .. because I want to put a script that
>will remove html tag
You should filt
On 5 Apr 2004 [EMAIL PROTECTED] wrote:
> When doing apachectl startssl I get:
>
> [Mon Apr 5 12:19:53 2004] [warn] Loaded DSO libexec/libphp4.so
> uses plain Apache 1.3 API, this module might crash under EAPI!
> (please recompile it with -DEAPI)
Sorry, I just realized there is a sep
Hi ..
i just wonder, is there any way to detecting the type of field
(like textarea, button, radio, etc) from $_REQUEST / $_POST ?
I need to detect that all .. because I want to put a script that
will remove html tag (with htmlspecialchars() function) ... and
the problem happen whe
[EMAIL PROTECTED] (Mathias brito) wrote in
news:[EMAIL PROTECTED]:
> Hello, I made a script that make a backup of the
> entire site with the PHPZip lib. It's works well with
> small sites, but when the size grow, i receive the
> following message:
>
> Fatal error: Allowed memory size of 1048680
[EMAIL PROTECTED] (Nunners) wrote in
news:[EMAIL PROTECTED]:
> I've got a series of functions which return a list in an array. How
> can I create an empty array? Or do I need to check it's a valid array
> before I use it?
>
> Cheers
> James
This may be helpful:
http://uk.php.net/manual/en/la
[EMAIL PROTECTED] (Nathan Croker) wrote in
news:[EMAIL PROTECTED]:
> Thank you for your reply.
>
> Yes the user has permission to execute chmod since when I access the
> server using an FTP Client it works perfectly.
>
> - Nathan Croker
>
> (amazing as a result of one post, I get 6 different s
I was making a parabola grapher and I was testing out some values. Part of
the script is to take the variable b and multiply it was negative one, then
multiply by 2 times a. I entered a test value where a equals 1, b equals 0,
and c equals 0. The result told me that -1 times 0 is -0.
Here's the
By upload meter do you mean a progress bar which can tell a user how
much of a large upload has been processed thus far?
As far as I understand it PHP cannot access raw POST data so this cannot
be done with PHP alone.
Thanks for the mention pablo. megaupload does indeed get a little help
from
how would you assign NULL to a variable if its original value is ""? otherwise leave
it with its value...
the form im working on has a date field called "date" on the form itself. that "date"
will get turned into $_SESSION[add][date] on the next page...
i want it so if the person filling out the
> $sql = "INSERT INTO x VALUES ({$_SESSION['add']['name']} ";
>
> oh, and unless add & name are actually constants you should always wrap
> them in single quotes. (php will covert the non-exstent constant into a
> string a issue an E_NOTICE + its overhead)
well that got me on the right track..
user curly braces around your arrays in the string e.g:
$sql = "INSERT INTO x VALUES ({$_SESSION['add']['name']} ";
oh, and unless add & name are actually constants you should always wrap
them in single quotes. (php will covert the non-exstent constant into a
string a issue an E_NOTICE + its
always do serverside - that the only secure option -
use clientside (in addition) as a favour to the user to avoid repeated
page requested to fill the form in correctly. (or in order to rearrange
data before submitting to server)
Matthew Oatham wrote:
Yes I agree I need some validation, dunno w
Tuesday, April 6, 2004, 1:21:52 AM, you wrote:
> hi...
> i cant cut and paste my exact mysql query because it takes the ''
> stuff out doubles the $'s and the ,'s in the whole thing (dont know
> why but anyways...)...
> i have a query that goes something like this:
> mysql_query("insert into $Gue
Matthew Oatham wrote:
Hi,
only use double quotes (") if you want to have variables interpolated e.g.
$myVal = 'its amazing';
$x = "wow $myVal";
think out about the way you layout your code - it helps when you
come back to it 12 months later ;-)
sanitize all incoming variables (POST/GET/COOKIE) by
Monday, April 5, 2004, 4:47:52 PM, you wrote:
> Hello all,
> I have a problem. My directory list is similar to this:
>>root
> >tmpl
> >inc
> >forums
> My question is in the test_form and message forums. How do I do the include
> files to read from the tmpl and inc??
> I can get t
hi...
i cant cut and paste my exact mysql query because it takes the '' stuff out doubles
the $'s and the ,'s in the whole thing (dont know why but anyways...)...
i have a query that goes something like this:
mysql_query("insert into $GuestbookTable values(NULL, '$_SESSION[add][date]',
'$_SESSIO
Monday, April 5, 2004, 11:23:29 PM, you wrote:
> I am trying to use fewer resources and processes when making database
> connections in my scripts, so, upon the first call to make a DB connection,
> I store the Link Resource ID in a constant variable that can be accessed by
> all other functions t
* Thus wrote Matthew Oatham ([EMAIL PROTECTED]):
> Hi,
>
> I am a newbie PHP programmer, I have some code that works but I want some tips on
> how I an Improve my code, i.e. should I be doing my updates / deletes on same php
> page as the display page, am I using transactions correctly, am I cap
for those who haven't yet read it:
Monty wrote:
Hi Red... Actually, I have my site set to only use cookies for storing
session ids to make it more secure and so that session ids aren't passed via
why is this more secure? the cookies go over the same wire as the post/get.
with regard to security h
If it were me I would do both Client and Server side validation.
The majority of the time the client side will suffice, but, simply put,
because you don't/may not look at the HTML source of a web page, doesn't
mean that nobody else does.
The fact of the matter is, you should not trust any data
On Monday 05 April 2004 04:00 pm, Matthew Oatham wrote:
> I don't think the fleet_id example will be a problem
> though as this is retrieved from the database where the field is an int.
google for "SQL injection" and you will see why what you currently have may
cause you some problems.
--
PHP
On Monday 05 April 2004 04:00 pm, Matthew Oatham wrote:
> Yes I agree I need some validation, dunno whether to do server or client
> side validation.
*both* :)
you should always do server side validation on any data, especially if you are
going to be putting it into your database. Client si
Yes I agree I need some validation, dunno whether to do server or client
side validation. I don't think the fleet_id example will be a problem though
as this is retrieved from the database where the field is an int.
Thanks for your feedback
Matt
- Original Message -
From: "Jordan S. Jone
Wells first of all, you are going to want better form input validation.
For Example:
foreach ($_POST['fleet_id'] as $key => $value) {
$fleetCode = $_POST['fleet_code'][$key];
$historyUrl = $_POST['history_url'][$key];
$downloadUrl = $_POST['download_url'][$key];
mysql_query("UPDATE imp_
Monty wrote:
A define is pretty much for strings only, not objects or resources. Try
using $GLOBALS['_CONNECT_DB'] instead.
I tried this, but, same results. If I store the Resource ID from a
mysql_pconnect() in $GLOBALS['_CONNECT_DB'] and then call...
mysql_query($query, $GLOBALS['_CONNECT_D
> I am a newbie PHP programmer, I have some code that works but I want some
> tips on how I an Improve my code, i.e. should I be doing my updates /
> include ("../db.php");
Some things I do is use single quotes include '../db.php' ;
(they are slightly faster, no replacments looking fo
Hi,
I am a newbie PHP programmer, I have some code that works but I want some tips on how
I an Improve my code, i.e. should I be doing my updates / deletes on same php page as
the display page, am I using transactions correctly, am I capturing SQL errors
correctly am I handling form data as eff
> A define is pretty much for strings only, not objects or resources. Try
> using $GLOBALS['_CONNECT_DB'] instead.
I tried this, but, same results. If I store the Resource ID from a
mysql_pconnect() in $GLOBALS['_CONNECT_DB'] and then call...
mysql_query($query, $GLOBALS['_CONNECT_DB']);
PHP
It appears you can't pass constant vars by reference, or am I missing your
point? I understand passing vars by reference, but not sure where you
suggest I need to use it. I tried "define('_CONNECT_DB', &$result);" and
"return &_CONNECT_DB;" separately, but neither worked.
> [snip]
> function conne
Monty wrote:
I am trying to use fewer resources and processes when making database
connections in my scripts, so, upon the first call to make a DB connection,
I store the Link Resource ID in a constant variable that can be accessed by
all other functions that need a DB connection, like this...
Hi Red... Actually, I have my site set to only use cookies for storing
session ids to make it more secure and so that session ids aren't passed via
the URL. Only problem with checking for existence of a session using your
method is that you have to first start the session, which is what I'm trying
[snip]
function connect_db() {
if (!defined('_CONNECT_DB')) {
$result = @mysql_pconnect("localhost", "Username",
"Password");
@mysql_select_db("database_name");
define('_CONNECT_DB', $result);
}
return _CONNECT_DB;
I call this function this way...
Maybe the post_max_size is also exceeded, and therefore it's handled with
sense I think.. Otherwise I'm not sure I think this is handled the right
way, if it's only upload_max_filesize that's exceeded.
--
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
"John W. Holmes" <[EMAIL PROT
I am trying to use fewer resources and processes when making database
connections in my scripts, so, upon the first call to make a DB connection,
I store the Link Resource ID in a constant variable that can be accessed by
all other functions that need a DB connection, like this...
function con
Again,
as a sidenote, this is the first example of the PHP session documentation:
[ quote - http://de.php.net/session ]
[ /quote ]
When using exactly this script you could check wether $_SESSION['count']
equals 0 to make sure the session was just created.
-- red again :-)
Red Wingate wrote:
Hi,
just on a side-note, the session is not always kept in a cookie ( if
cookies are deactivated the session is saved in the _GET or _POST variables.
A check for $_REQUEST[session_name()] might help you some more but can
be exploited quite fast
eg: index.php?SID=foo
I guess the best way to so
From: "Jay Blanchard" <[EMAIL PROTECTED]>
> > [snip]
> > I have a form in a page 1, that POSTs a file and some hidden's to page
> > 2. If
> > the file size is bigger that the max in php.ini, in page 2, $_POST is
> > empty.
> > [/snip]
>
> Why, of course it is! The php.ini sets the max file size $_
Thanks, Aaron, I tried this method and it appears to work just fine. Here's
a simplified version of what I'm doing:
if (isset($_COOKIE[session_name()])) {
session_start();
if ($_SESSION['loggedin'] <> 'yea_baby';
session_destroy();
$_SESSION = array();
// Ret
[snip]
I have a form in a page 1, that POSTs a file and some hidden's to page
2. If
the file size is bigger that the max in php.ini, in page 2, $_POST is
empty.
[/snip]
Why, of course it is! The php.ini sets the max file size $_POST will be
empty because it would not be allowed to load. You ha
Just don't use register globals and use "if ($_POST)" instead of
"if($action=='post')" so you don't have to include that ?action=post in
the query string of your action.
Dvdmandt wrote:
Accutually, I intented ?action=post, and if($action=='post'), just forgot to
add method="post".. :p
--
Regards
Hi.
I have a form in a page 1, that POSTs a file and some hidden's to page 2. If
the file size is bigger that the max in php.ini, in page 2, $_POST is
empty.
In the mood for a look ?
upload.html:
Attach your file here:
upload2.php:
$_POST is empty...
Is
From: "Mike Zornek" <[EMAIL PROTECTED]>
> There is a column called Address in my email table, Thus I am creating a
PHP
> object called Email to interact with it. The Address variable of this
object
> will hold a string like "[EMAIL PROTECTED]".
>
> In the setAddress method should I check for a val
Thanks the feedback so far. To expand the scope of my issue past enums
(which by their limited nature are easy to check and set defaults) let me
ask this...
There is a column called Address in my email table, Thus I am creating a PHP
object called Email to interact with it. The Address variable of
Accutually, I intented ?action=post, and if($action=='post'), just forgot to
add method="post".. :p
--
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
"Blake Schroeder" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> One problem
> wrong
>
> right
>
> ?action is a
I agree. I believe the default FORM METHOD is GET.
> One problem
> wrong
>
> right
>
> ?action is a variable with a value of post
>
> -Blake
>
>
> DvDmanDT wrote:
>
>>Hmm.. Are there any PHP settings that only applies to that vhost? Can you
>>please try to run PHP as CGI few tries.. If the inp
Is this what your are trying to do?
$var = $_POST['var'];
if($var)
var_dump($_REQUEST);
else
{
?>
DvDmanDT wrote:
Hmm.. Are there any PHP settings that only applies to that vhost? Can you
please try to r
One problem
wrong
right
?action is a variable with a value of post
-Blake
DvDmanDT wrote:
Hmm.. Are there any PHP settings that only applies to that vhost? Can you
please try to run PHP as CGI few tries.. If the input is corrupt, that
_could_ be caused by the Apache2 which accutually is marked
Hmm.. Are there any PHP settings that only applies to that vhost? Can you
please try to run PHP as CGI few tries.. If the input is corrupt, that
_could_ be caused by the Apache2 which accutually is marked as
experimental... Basicly, this would get currupt?
(wierd-var-test.php)
Or are there
Hello, I made a script that make a backup of the
entire site with the PHPZip lib. It's works well with
small sites, but when the size grow, i receive the
following message:
Fatal error: Allowed memory size of 1048680 bytes
exhausted at (null):0 (tried to allocate 170685 bytes)
in /srv/www/htdocs/z
Steve Murphy wrote:
> Can cURL be used to create an HTTP or FTP upload meter?
>
> Steve
By upload meter do you mean a progress bar which can tell a user how
much of a large upload has been processed thus far?
As far as I understand it PHP cannot access raw POST data so this cannot
be done with P
Richard Harb wrote:
Hi there,
Supposed I have an array of objects, like:
$this[$i]->property1
$this[$i]->property2
is there any 'cheap' way to sort the array according to the values of
property1?
http://www.php.net/usort
Example:
function cmp($a, $b)
{
if ($a->property1 == $b->property1) {
From: "Jason Wong" <[EMAIL PROTECTED]>
> On Monday 05 April 2004 22:46, [EMAIL PROTECTED] wrote:
> > Thank you all for your ideas so far, however, I ahve gone through all my
> > code, and cannot seem to find the culprit.
>
> I believe it is a known bug with a particular old version of PHP, try
usi
From: "Mike Zornek" <[EMAIL PROTECTED]>
> I'm making a conscience effort to improve my PHP skills, that being making
> objects, unit testing, better error handling etc. So I have a questions.
>
> I have a database that is storing all of my records. One column is of type
> enum where the two legal
On Monday 05 April 2004 22:46, [EMAIL PROTECTED] wrote:
> Thank you all for your ideas so far, however, I ahve gone through all my
> code, and cannot seem to find the culprit.
I believe it is a known bug with a particular old version of PHP, try using
the latest.
--
Jason Wong -> Gremlins Assoc
Can cURL be used to create an HTTP or FTP upload meter?
Steve
Do you have the option of printing through Word or something similar?
We had the same problem and ended up saving the file to a cache and
using COM objects to print to the default printer through Word.
The code looks a bit like this... Of course, it expects you to define
the $saveFile as the file
Mike Zornek wrote:
Oops, forgot to send my original response to the list last time.
On 4/5/04 1:33 PM, "Jason Giangrande" <[EMAIL PROTECTED]> wrote:
What I usually do is create a select box that has only the values of the
enum. That way no one should be able to (in theory) put any value other
th
Greetings,
Has anyone out there transitioned an existing app from using the
mysql_* functions in PHP to PEAR DB?
I'm re-writing an existing PHP application, and I'm required to utilize
PEAR's DB class as the database layer. Currently, the application is
using the mysql_* functions to access th
I'm getting the following error when using the Mail_smtp package from PEAR:
PHP has encountered an Access Violation at 0177A8B4
It does not occur everytime I use it, but even when send() returns true,
e-mail messages are not being sent. However, it all worked fine a week
ago when I was testing
I'm making a conscience effort to improve my PHP skills, that being making
objects, unit testing, better error handling etc. So I have a questions.
I have a database that is storing all of my records. One column is of type
enum where the two legal values currently are "home" and "work"; "work" is
Hi Folks ...
A small problem here ...
I just rebuilt Apache 1.3.29 with mod_ssl.
When doing apachectl startssl I get:
[Mon Apr 5 12:19:53 2004] [warn] Loaded DSO libexec/libphp4.so
uses plain Apache 1.3 API, this module might crash under EAPI!
(please recompile it with -DEAPI)
I r
I had some similar problems ! Here's what I did.
include $_SERVER['DOCUMENT_ROOT'] . '/includes/_myInclude.php' ;
Putting the DOCUMENT_ROOT ensured I was always pointing to the top
directory of the web pages.
Daniel Clark
>>I have a problem. My directory list is similar to this:
>> >root
>>
At 16:47 5-4-04, you wrote:
Hello all,
I have a problem. My directory list is similar to this:
>root
>tmpl
>inc
>forums
>test_forum
>messages
>test_forum1
.messages
My question is in the test_form and message forums. How do I do the include
file
I think you'll want to use the 'imagecopyresized' function. Something like
this:
$thumbnail = imagecreate(100, 100);
$original = imagecreatefromjpeg("uploadedfile.jpg");
imagecopyresized($thumbnail, $original, 0, 0, 0, 0, 100, 100,
imagesx($original), imagesy($original));
imagejpeg
If I think I understand you, your 'root' directory is the 'forums' directory,
and you'll probably want to do something like:
include($_SERVER["DOCUMENT_ROOT"] . "/../inc/include1.php");
The double-dots take you back a directory.
Is that what you're after?!
Richard
-Original Message-
Jason -
I would like to give users the ability to upload jpeg images and have my
php app size them into thumbnails as well as have a larger image
available if the thumbnail is clicked.
Are there examples of this available?
Todd
Jason Barnett wrote:
From http://www.php.net/manual/en/function
I think you can do this:
"../tmpl/header.htm"
try it and let us know!!
hope this helps
Angelo
-Original Message-
From: Will [mailto:[EMAIL PROTECTED]
Sent: Monday, April 05, 2004 4:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP] includes
Hello all,
I have a problem. My directory list is si
Hello all,
I have a problem. My directory list is similar to this:
>root
>tmpl
>inc
>forums
>test_forum
>messages
>test_forum1
.messages
My question is in the test_form and message forums. How do I do the include
files to read from the tmpl and
Thank you all for your ideas so far, however, I ahve gone through all my
code, and cannot seem to find the culprit.
I did a var dump, and also a dump of the REQUEST, GET, and POST variables,
and here is an example of what I am seeing (submitting "test"):
string(7) "testiU"
_REQUEST: Array
(
Scrap my last effort, this was the one I should have sent!
Obviously replacing the web site details and PHP page name, but using the
'width' and 'height' values as you please!
Cheerio (again!)
Richard
-Original Message-
From: E.H.Terwiel [mailto:[EMAIL PROTECTED]
Sent: 05 April 2004
I wrote a JavaScript page that redirects to a PHP page like this:
Redirecter
function redirectUser()
{
location.href="http://www.mysite.com/page2.php?width="; + screen.width
+ "&height=" + screen.height;
}
The PHP
E.H.Terwiel wrote:
I want to write a Server Side PHP program that generates a HTML page
client side.
How would I get at the clients' screen size, before serving the
generated page ?
Would it be a two-step process: first let the client execute a piece
of JavaScript to generate Height and Width, and
Hello,
Monday, April 5, 2004, 3:20:03 PM, you wrote:
EHT> I want to write a Server Side PHP program that generates a HTML
EHT> page client side. How would I get at the clients' screen size,
EHT> before serving the generated page ? Would it be a two-step
EHT> process: first let the client execute
I want to write a Server Side PHP program that generates a HTML page
client side.
How would I get at the clients' screen size, before serving the
generated page ?
Would it be a two-step process: first let the client execute a piece
of JavaScript to generate Height and Width, and then send those val
On 4/5/2004 3:12:11 PM, Nunners ([EMAIL PROTECTED]) wrote:
> I've got a series of functions which return a list in an array. How can I
> create an empty array? Or do I need to check it's
> a valid array before I
> use it?
>
> Cheers
> James
James,
Please put the topic in the subject line so we
Jay Blanchard wrote:
[snip]
"naked"
[/snip]
Dang John, I guess I don't think octally any more!
John writes out his grocery list in Hex. ;)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Alireza Balouch wrote:
It's easy...
Al you have to do is call the php script like: php4 mydesktopscript.php
and use other languages like TCL/TK to have some GUI on your script..
but i would rather learn my self C instead of using php for Desktop app.
<[EMAIL PROTECTED]> wrote in message
news:[EMA
T UmaShankari wrote:
Hello,
Is there possible to place a list box over one many background picture
using php anyways ?
No, this is not possible with PHP. PHP is not a client-side language.
You need to solve this problem with HTML.
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
Hello Nunners,
Monday, April 5, 2004, 2:12:11 PM, you wrote:
N> I've got a series of functions which return a list in an array. How can I
N> create an empty array? Or do I need to check it's a valid array before I
N> use it?
$void = array();
That is an empty array. You can also use it to clear
I've got a series of functions which return a list in an array. How can I
create an empty array? Or do I need to check it's a valid array before I
use it?
Cheers
James
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, Apr 05, 2004 at 05:03:17AM +0200, Richard Harb wrote:
> Hi there,
>
> Supposed I have an array of objects, like:
>
> $this[$i]->property1
> $this[$i]->property2
>
> is there any 'cheap' way to sort the array according to the values of
> property1?
>
Try array_multisort() ->
// cre
My question involves sending html to the printer to be printed properly.
Here is my code:
$handle = printer_open('Lexmark Z25-Z35'); printer_start_doc($handle,
"test"); printer_start_page($handle);
printer_set_option($handle, PRINTER_MODE, 'raw');
printer_set_option($handle, PRINTER_PAPER_FORMAT,
You can use $_REQUEST too, it has $_GET, $_POST and $_COOKIES.
-William
El s?, 03-04-2004 a las 11:30, Larry E.Ullman escribió:
> > When using a link like xxx.proceed.php?language=gbr
> > the 'proceed.php' script does not receive any $language variable.
> >
> > Does someone know how to get it ru
You could do this like this ( as it is faster ):
function CreateDate($day, $month, $year) {
return $year.$month.$day.'00';
}
CreateDate(04,04,2004) -> 2004040400
But make sure you add the leading zero to $month and $day ( can
be easily done (number_format for example) )
-- red
Am
if you need to turn the result of mktime() into a valid mysql timestamp
format then put these 2 lines in your code when needed:
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Guys, second thought.
mktime builds a unix time stamp (since the unix epoch, Jan 1, 1970 [I
guess]), the difference are maybe due to time zones, because its the
number of seconds since Jan,1 1970.
On Mon, 5 Apr 2004 06:29:12 -0400, Andy B wrote:
"On my personal machine the return value is:
1081
I got 1081047600 for
$time=mktime(0,0,0,4,4,2004);
echo $time;
(RH9, PHP 4.3.4)
On Mon, 5 Apr 2004 11:34:11 +0100, Nunners wrote:
I got 1081033200
Two thoughts:
1 - is $time a global variable predefined as the current time? Don't
think
it is?!?!?!
2 - Could it be to do with local time
Woops little mistake there, first of all it's 'gmmktime()' secondly the source
should look something like:
$var = mktime ( 0,0,1,4,4,2004 ) - 1;
You can find a nice article on this topic here:
http://www.phpbuilder.com/columns/ehresman20030911.php3?page=1
-- red
[...]
> Your Server will most
Your Server will most likely run in a different timezone. If both of you
would use gmktime() the result will be the same.
As for the negative result: Had the same problem some time ago - seams
to me as if PHP doesn't like those 0,0,0 ( try 0,0,1 instead ) - You can
adjust the result by reducing th
I got 1081033200
Two thoughts:
1 - is $time a global variable predefined as the current time? Don't think
it is?!?!?!
2 - Could it be to do with local time settings i.e. comparing american dates
with UK dates (1/Aug/04 and 8/1/04)?
Nunners
> -Original Message-
> From: Andy B [mail
"On my personal machine the return value is:
1081026000"
interesting... i got 1081054800 from mine with the code:
even on cli it gives the same thing
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi there,
On a host running:
PHP 4.3.5 (cli) (built: Apr 3 2004 07:11:21)
I found a strange error produced by the mktime() function:
mktime(0, 0, 0, 4, 4, 2004)
returns -7262
On my personal machine the return value is:
1081026000
If anybody's aware of that bug and if it's fixed, please answe
Hello,
Is there possible to place a list box over one many background picture
using php anyways ?
Regards,
Uma
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I curretly running: PHP 4.3.4 on a windows XP with IIS,
This is the first time developed using a windows platform (normally I use
apache on linux), but I'm trying to run ImageMagick in the background to
resize an image, as a test I'm trying to run the cmd shell, using exec
(I've tried system,
My first thought is that some dynamic code on this page has an error.
Typical like this :
news:[EMAIL PROTECTED]
> This problem only seems to be happening on one of the virtual hosts on
this
> system, and I cannot seem to figure out just what it is.
>
> I have a simple form posting to search.php,
1 - 100 of 117 matches
Mail list logo