As far as I understand it is only possible to create a DateTimeZone
Object from a string, which describes the timezone.
On the other hand it is not possible (at least I did not find any
possibility) to get the users tz string, it is only possible to get the
current UTC offset. (via JavaScript
Norbert Wenzel wrote:
Hi,
just for fun I tried the following code:
for($letter = 'A'; $letter <= 'Z'; ++$letter) {
echo($letter . ' ');
}
What surprised me was the output, which looked like this:
A B C [...] Y Z AA AB AC [...] YY YZ
I don't have
Hi,
just for fun I tried the following code:
for($letter = 'A'; $letter <= 'Z'; ++$letter) {
echo($letter . ' ');
}
What surprised me was the output, which looked like this:
A B C [...] Y Z AA AB AC [...] YY YZ
I don't have any idea how these letters get printed out, so I'd
appreci
Hi,
I think I once knew a PHP5 interface, which forces a class to implement
a function empty(). If an object $myObject implements this interface, it
should be possible to call empty($myObject) as it seems to work with the
interface "Countable", which does the same for count().
The problem is
Manuel Lemos wrote:
For instance, if you use method="post" because XHTML specification says
everything should be in lower case, you will have problems with some
browsers and e-mail programs that only accept POST in upper case and
fallback to GET when they find something else.
i would call that
eks ago by Jochem Maas:
in this case there is an alterntive:
http://php.net/manual/en/function.xml-set-object.php
Norbert Wenzel wrote:
> Robert Cummings wrote:
>
>> On Sat, 2005-12-10 at 11:25, mail wrote:
>>
>>> xml_set_element_handler($parser, "xml_start_element
I did some easy xml parsing on the last.fm[1] recent tracklist.
I do read in all the tracks and output them encoded with htmlentities().
A lot of german special chars like the Ä (Ä) are transfered to
strange followings of an A with any sort of available accent. But it
isn't replaced by Ä
The
Robert Cummings wrote:
On Sat, 2005-12-10 at 11:25, mail wrote:
xml_set_element_handler($parser, "xml_start_element", "xml_stop_element");
//can't find function
use array notation for object method handlers:
xml_set_element_handler
(
$parser,
array( $this, 'xml_start_element' ),
Dan Harrington wrote:
I have a TON of forms that I have to populate, can I make a PDF file using
Acrobat Professional, and then use PHP to populate those forms and have text
inserted into the pre-made text fields that I made using Acrobat? And if
so, what is the best tool for that? I'd prefer t
Rick Lim wrote:
What is the best FREE pdf generator for PHP?
i used FPDF without any problems.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Leclair wrote:
Hi Norbert,
Thanks for your reply. Yeah, you were almost there - it wasn't quite what I
had in mind. I probably should have elaborated on this one.
I'm looking at building up a library of handy functions that can be included
in a current script.
Only problem is:
(let's
Richard Leclair wrote:
Hi PHP-ers,
Here's an easy one:
Q: How can I make a function available from within another php script?
Eg. B.php contains:
Which has a function fn($x);
Later on, I want to include this function in B.php somewhere.
In short: B.php wants to use fn($x) found in A.php.
David wrote:
Can we use some function with GD to make text italic, bold and/or
underline?
http://php.net/imagettftext
I see we can change size and font, but not style
it's not possible in PHP?
Thanks in advance
David
I'm not familiar with GD, but as every good font has different versions
Ben wrote:
My understanding is that mysql_real_escape_string will only work while
you are connected to mysql. Not sure if that is the case in your
situation.
At least it requires a connection to mysql. I had an error, when using
it without any connection opened before, that mysql_real_escape
Jochem Maas wrote:
Norbert Wenzel wrote:
I know a script (it's a webgallery) where you upload your images.zip
with any amount of images in it. After uploading the .zip get unzipped
and the images will be placed into the gallery.
How did they unzip (or better, how is it possible to
I know a script (it's a webgallery) where you upload your images.zip
with any amount of images in it. After uploading the .zip get unzipped
and the images will be placed into the gallery.
How did they unzip (or better, how is it possible to unzip) the file
with php? and is it possible to extra
(hope) wrote:
i have a text area on my page.
As page is uploaded it displays certain text in it.
It has also has a text area with same text that is being displayed above
in the page .
If user changes this text of text area n presses submit button
the page needs to display updated text in the t
I have to say thank you to you both. In fact I still don't know what
exactly was wrong or may have caused this error (output buffering was
off, and there was no @ in the whole file) but after a night of sleep I
tried again before reinstalling the server and everything worked as fine
as it shoul
Norbert Wenzel wrote:
echo $_SESSION['view']->getContent();
of course this echo IS in , i just forgot here in my message
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi, i have a very strange example of code. Maybe you know where my
mistake could be.
I've got an index.php with a few div's and a short php code, like:
echo $_SESSION['view']->getContent();
The view is in every case one of my view objects. And there's the problem.
In my specific case $_SESSION[
A.J. Brown wrote:
">
works well too
works only if register_globals is on, doesn't it?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Roman Duriancik wrote:
link
and when i click on link always I have in $count value 1 but I need
value 2,3,
how to do it ?
i think this is what you asked for:
if(isset($_SESSION['count'])) {
$_SESSION['count']++;
}
else {
$_SESSION['count'] = 1;
}
--
PHP General Mailing L
Thanks.
Norbert
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I'm using PHP5 and try to do something like this:
I have a base class called 'Entry' and a child class called
'ExtendedEntry'. I want to read all Entries to a certain topic from a
database.
While constructing the EntryObject I would like to look if Entry is a
simple Entry or an Extended
Alex Gemmell wrote:
Just a quickie today: I was wondering if I can declare a Class variable
as a certain type of object. I'm using PHP 4 by the way.
I don't know if this works in PHP4, but I would suggest to clear this in
your constructur. But I don't know if this is always called in PHP4.
Thomas Hochstetter wrote:
Hi again,
Is it possible to catch all parser errors (notices), and as that happens
redirecting to a 'sorry-page-not-available-at-this-moment' page, whilst
storing the error (or notice) message somewhere else (e.g. emailing it to
the developer).
thanks
Thomas
From yo
Richard Lynch wrote:
You're on your own converting 1:38 or 357 into minutes, but:
$minutes = 357;
$minutes = 15 * round($minutes / 15);
echo "minutes: $minutes\n";
Thank you both. The conversion from 1:38 to 98 is no problem, but I knew
there was a more beautiful way round to 15 minutes.
Th
Excuse me, I know my question is not PHP specific, but I hope there are
some logical and mathematical talents in here, since I've always been
fighting with maths. ;-)
I have to provide a textfield, where workers enter their time they
worked on a certain subject. The smallest degree should be 1
Richard Lynch wrote:
There may also be some fancy new way to output the whole stack of
functions called... I haven't really checked that out yet.
The function stack is printed by debug_backtrace(), isn't it? Supported
by PHP since 4.3.0.
Norbert
--
PHP General Mailing List (http://www.php.n
Richard Lynch wrote:
Right-click is NOT universal.
Macs don't even *have* a right-click!
Doesn't Ctrl-Click do the same as a right click?
Norbert
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sebastian wrote:
some of my users are complaining that when they try download media
files (mp3, mpeg, etc) their media player opens and doesn't allow them
to physically download the media. These are IE users, firefox seems to
like my code, but IE refuses to download the file and plays it inste
Jochem Maas wrote:
Norbert Wenzel wrote:
private $var;
get rid of the 'private' here and replace it with 'protected'
too stupid. I'm sorry for my question.
thank you for opening my eyes.
norbert
--
PHP General Mailing List (http://www.php.net/)
To
Is it possible to run inherited methods in the scope of the child class?
In my case I have an abstract class called 'Company' and some child
classes. There is a non abstract function in 'Company' which prints
'$this->phoneList'. That function should be the same to all child
classes, without re
Thomas wrote:
Thanks Burhan. Is there much overhead?
Norbert: that's what I am doing now, just wanted to save some code. :-)
Thomas
-Original Message-
From: Norbert Wenzel [mailto:[EMAIL PROTECTED]
Sent: 08 August 2005 11:18 AM
To: php-general@lists.php.net
Subject: [PH
Thomas wrote:
Hi there,
How can I do something like this:
[snip - theoretical code] if( isset($step) ) echo step.$step() ) [/snip]
$step would be an int (I would check that before) and then I would have all
sorts of functions like step1(), step2() . etc.
Any ideas?
Thomas
Brian Dunning wrote:
Hey all -
...
is there a preferred one-stop-shop installer CD or anything (easy -
knock on wood)?
the really easy way is to use xampp [1]. I know it is easy, because even
I got that thing working within a few minutes. but mind the security of
the box, xampp is configu
Torgny Bjers wrote:
The Java way doesn't work here. The best approach would be to simply run
a try/catch/finally around the call to your function/method, and inside
the function itself you do the following:
if (...) { throw new Exception("My message."); } }
Hello Torgny,
Thanky you for your f
If there is a class with a function, that might throw exceptions and
does NOT catch them, may I write that like in Java?
class FooClass {
public function foo() throws Exception {
}
}
Or is there another possibility to tell a function throws an exception
and to force the call
Matthew Weier O'Phinney wrote:
* Norbert Wenzel <[EMAIL PROTECTED]>:
Hi, I've done something like this:
class MyClass {
private $var;
function __construct($value) {
$this->var = $value;
}
public function printVar() {
echo($this->var);
}
}
$o
Norbert Wenzel wrote:
public function printVar() {
echo($this->var);
}
I have to do a little correction, i wrote
$this->$var
to see the variable, otherwise i don't see
anything.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://
Hi, I've done something like this:
class MyClass {
private $var;
function __construct($value) {
$this->var = $value;
}
public function printVar() {
echo($this->var);
}
}
$object = new MyClass('1');
$object->printVar(); // prints 1
$object->var = 3; // Fatal Error as expecte
41 matches
Mail list logo