Daniel Schierbeck wrote:
I've made a small PHP script that renames the files and folders in my
music library, to make them more linux-friendly. I'm running PHP 5.0.3
on version 2.6.9 kernel.
What's happening is that all files and folders are renamed, except for
folders whose n
I've made a small PHP script that renames the files and folders in my
music library, to make them more linux-friendly. I'm running PHP 5.0.3
on version 2.6.9 kernel.
What's happening is that all files and folders are renamed, except for
folders whose names consist of one word only (such as Toto
Christopher Fulton wrote:
This should work for you then(maybe...i don't have php5 on my
system, so it may not, but i think it would.
http://us4.php.net/manual/en/function.get-class.php
class Car {
function drive() {
return get_class($this);
}
}
class Porshe {
}
$
Torsten Roehr wrote:
"Christopher Fulton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Not sure if this is the best way to do it or not, but you can do this
and it should (untested code) work.
class Car {
function drive() {
return $this->getClassName();
Andrew Wickham wrote:
Does anyone know of any college scholarships for PHP or Computer Science. I
need some non-college specific ones.
The reason I ask is obviously because I need some help going to college
through scholarships, and I have been programming in PHP for about 6 years
now.
Please hel
Tony Di Croce wrote:
I am fairly new to PHP, but I am loving it... I have recently gotten
involved in a business venture and I have been using PHP so far...
Recently I have taken on a partner, and he is a big ASP guy...
I am not totally against ASP, but it would have to be pretty good to
get me to
Arthur wrote:
Hi,
in the following code, i want to get a constant value from config.php. I
don't receive the value, that is defined, but the name of the constant.
I tested the defines in config.php by echoing all defines, and it was
allright, so i'm quite confused why it doesn't work here.
That's m
Chris Boget wrote:
Is there a way to replace/remove *whole* words from a
phrase? For example:
if( count( $exceptionsList ) > 0 ) {
foreach( $exceptionsList as $exceptionPhrase ) {
$stringToParse = str_replace( $exceptionPhrase, '', trim(
$stringToParse ));
}
$retval = trim( $s
read only?
I thought for sure I was able to reply on it some time ago
Thanks,
-J
No. I'm using the news server too. It's just slow sometimes, and might
throw an error.
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&am
ied off Zend Studio, but I
thought it was slow and had a messy and ugly user interface.
And hey, Eclipse is free!
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
, but to me as well.
Please use strip_tags to allow only the tags you *NEED* the users to be
able to use.
It will only take you seconds, and it will save you (and us) a lot of
grief in the long run.
--
Like Music?
http://l-i-e.com/artists.htm
You still need to control it. This would certainly
a way to take an HTML
string and add closing tags and comments to it if needed?
Thanks,
Matt
I would use a regular expression to grab the valid opening and closing
HTML tags, and use something á la htmlentities() on the rest of the
document.
--
Daniel Schierbeck
Help spread Firefox
Daniel Schierbeck wrote:
public static function getData ()
Ooops, the method shouldn't have been static :)
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To un
ublic static $data = 'This is the data';
public static function getData ()
{
return self::$data;
}
}
$obj = new TestClass();
echo $obj->getData();
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user
me timbers! There be treasure in them thar hills!
And no, I'm not from the US ;)
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
rrr, there be treasure in them thar hills! Lootin' time! Arrr!
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
tring = 'John Doe Fooroad 11 35 US'; // John,Doe,Fooroad,11,35,US
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
end when I
hit the submit button. I'm thinking this is perhaps my
problem.
Can anyone help please
Stuart
I'd go with a POST form and a JavaScript
Or something. I'm not really that good with JavaScripts.
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http:
Daniel Schierbeck wrote:
Hello there!
There seems to be some tendency towards using spaces instead of tabs
when indenting PHP code - personally i can't come up with any reason not
to use tabs. I was just wondering if any of you freakees had some sort
of explanation...
Wow, didn't mea
Hello there!
There seems to be some tendency towards using spaces instead of tabs
when indenting PHP code - personally i can't come up with any reason not
to use tabs. I was just wondering if any of you freakees had some sort
of explanation...
--
Daniel Schierbeck
Help spread Fi
it is 0 and I would like to
avoid using that long style with if (..) {...} else {...}...
Thank you.
Teddy
Like the others said, use the ? : method:
$var = (isset($_GET['var']) && $_GET['var']) ? $_GET['var'] : 'value';
--
Daniel Schierbeck
Help sp
Klaus Reimer wrote:
you can implement it completely statically so
you don't need to instanciate the class
Well, it might be useful to have more than one list of projects, ie if
you want all design-related projects, or all PHP-projects.
--
Daniel Schierbeck
Help spread Fi
it has
OO features, you can call it whatever you like, I'd still be happy.
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Robb Kerr wrote:
This is a test post from a new client. I'm trying to decide whether or
not to keep it. Please post a reply so that I can see how it shows up.
Thanx,
Robb
FUBAR
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/regis
s ()
{
return $this->projects;
}
public function addProject ($name, $owner)
{
// ...
}
public function deleteProject ($id)
{
// ...
}
}
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spr
ssian speaking
visitors.
Yup. I think it's better if you let the visitors decide.
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
gt;
How can I determine user's primary language?
Thanks!
dap
I don't think it's possible. You can, however, ask the user to select
which language he wishes to see, then store that option in a cookie so
he doesn't have to do it every time he visits the site.
--
Daniel Schierbeck
Help
ges aside from using a session variable.
Thank you ,
Stuart
Where are you redirecting the client to? An error page?
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, maybe an IF then:
if (!do_something()) {
exit('Still can\' do it...');
}
But there are also much more sophisticated ways of doing it. Clarify
exactly what you're trying to do, and we'll get back to them.
--
Daniel Schierbeck
Help spre
Matthew Weier O'Phinney wrote:
* Daniel Schierbeck <[EMAIL PROTECTED]>:
Giles Roadnight wrote:
If I defined a function with 4 parameters but only pass 3 I get an
error. Is there anyway around this?
I want to be able to set the missing parameter to a default value if it
is not passed whi
Roadnight
http://giles.roadnight.name
If you want an argument to be optional and still be able to check
whether or not it's been set, you can use NULL as the default value:
function foobar ($a, $b, $c = null)
{
if (isset($c)) {
echo 'The third argument was set';
re to keep the accelerator to the floor.
-Ryan
Wow, I can feel the positive vibes coming from your posts! Halelujah!
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
hierbeck_2:
echo 'Just a moron';
break;
default:
echo 'both of the above';
}
1) I'm not American.
2) Nice job with the constants, though I usually use upper case
characters only...
3) Don't get personal, nobody likes a bitch.
--
Daniel Schierbeck
Help sp
ATE_NADER:
default:
echo 'Didn\'t see *that* one coming, did you?';
}
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
harge. The two latter are plugins for the Eclipse framework
(the first).
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daniel Schierbeck wrote:
Nick Wilson wrote:
hello all
I am foreach()ing through an array of ip addresses in a 'ban script' and
have the following php code:
foreach($ips as $ip) {
preg_match("/$ip/", $_SERVER[REMOTE_ADDR]);
$ban = TRUE;
}
This is great, but if 127.0.0 were
R['REMOTE_ADDR'], $banned_ips)) {
die('Dude, you\'re banned!');
}
But if I were you I'd choose something more advanced.
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
you delete all rows that are more than 5 or so minutes old.
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
g new passwords for their account is not an option.
Thanks for any ideas,
Kris
Can't you just use the db's (i assume you use MySQL, most do) built-in
MD5 function?
SELECT id, username FROM users WHERE username LIKE 'myuser' AND
password = MD5('mypass') LIMI
M Saleh Eg wrote:
Exactly Daniel ! I should've mentioned that too. Thanx for making it clear.
No problem 8)
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
className(1);
//Or
$obj=new className(1,"hello");
//Or
$obj=new className(0,"","some_value");
Bottom Line:
Optional arguments might be a workaround lack of polymorphism sometimes !
Better use
if (isset($param1)) { ...
then, otherwise values such as 0 will cause
cted function two ($args)
{
// bar
}
}
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
R, E_USER_WARNING and E_USER_NOTICE.
php.net (http://dk2.php.net/manual/en/function.set-error-handler.php)
says this:
Note: The following error types cannot be handled with a user defined
function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING,
E_COMPILE_ERROR, E_COMPILE_WARNING, and E_STRICT.
tudio's (that's just plain ugly
and confusing) - plus, it's free! And open-source! Yay!
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
(hey,
I'm poor), but the Eclipse IDE is cross-platform (so are the plugins as
far is I know.)
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, vi
you can make the property static (at least in PHP5):
class MyClass
{
public static $myClassVar = "Bob";
}
echo MyClass::$myClassVar; // Bob
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com):
http://www.spreadfirefox.com/?q=user/register&r=6584
--
PHP General Mai
Louie Miranda wrote:
Im trying to output a pdf over a browser so i can hide the url link to
it. but this one causes corruption.
Try this..
http://dev.axishift.com/php/getpdf.php
i got this part..
"Note: There is a bug in Microsoft Internet Explorer 4.01 that
prevents this from working. There is no
Matthew Fonda wrote:
On Sun, 2004-10-03 at 04:39, Graham Cossey wrote:
isn't the || same as && ? Or I missed something?
No, || is OR, and && is AND
Check out http://www.php.net/manual/en/language.operators.logical.php
Wll - sort of. The precedence level can be tricky, sometimes
"||" doesn
Argesson wrote:
try this:
if ($REMOTE_ADDR == "212.3.54.65" && $REMOTE_ADDR == "212.3.54.66")
Joe Szilagyi wrote:
Hi, I have this working:
if ($REMOTE_ADDR == "212.3.54.65") {
header("Location: http://www.google.com/search?&q=huzzah";);
Redirect browser
exit;
}
But I want t
"Jensen, Kimberlee" <[EMAIL PROTECTED]> wrote:
What do you use for your naming conventions for
variables
functions
classes
I'm trying to tell my students what the standard is currently. Are people using
camel case or underscores or both?
I use this:
$a_variable
ClassName
a_function()
aMethod()
--
P
Christophe Chisogne wrote:
Daniel Schierbeck wrote:
return ($var > $min && $var < $max) ? TRUE : FALSE;
> (...)
> return in_array($needle, $haystack) ? TRUE : FALSE;
You can return booleans without comparing them to true/false:
return $var > $min && $
Jay Blanchard wrote:>
You could write a function and share it with the rest of us!
function between ($var, $min, $max)
{
return ($var > $min && $var < $max) ? TRUE : FALSE;
}
function in ()
{
if (func_num_args() < 2)
trigger_error('You must provide at least one argument for in()',
E_USE
Paul Hudson wrote:
I've written a short PHP tutorial and am looking for input - does it
cover enough ground? Is it hard to use as a reference? Does it get
too technical?
Anyway, if you have any ideas as to how it can be improved, I'd be
happy to hear from you. The URL is http://www.hudzilla.org/
Arzed wrote:
it seems that php first ends output buffering and then calls then
destrcuts the objects. so the output buffering is still ended when the
destructor is calles. one has to unset the object to reverse that order
manually.
I've encountered the same "problem". It would be nice if there w
Sam Hobbs wrote:
"Steve Brown" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Sam, if you wouldn't mind answering a question: are you still unable
to connect to your mysql server?
I am able to connect now.
I'm sorry that you feel its a time-consuming process. I'm sorry that
you ar
I'm using it for the Wiki (thanks for that as well guys):
http://aoide.1go.dk/lab/compare.php5
Source: http://aoide.1go.dk/lab/compare.source.php5
(it's just a test)
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Trevor Gryffyn wrote:
Or...
$highestkey = max(array_keys($arr));
-Original Message-
From: Martin Holm [mailto:[EMAIL PROTECTED]
Sent: Friday, September 17, 2004 11:11 AM
To: Daniel Schierbeck
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Highest Key in an Array
Daniel Schierbeck wrote:
I
I've been looking at php.net, but i couldn't find what i'm searching for.
I have a numeric array, and i'd like to get the highest key. E.g.
$arr = array(3 => "foo", 7 => "bar", 43 => "foobar");
What i want is a function that,
Nick Wilson wrote:
Anyone else getting these infuriating italian messages about some muppet
that doesnt exist?
'desintione non existente'?
I've written to [EMAIL PROTECTED] but no joy, everytime i post on the
php list i get half a dozen of the damn things...
Yup, guess some Italian 1337 h4x0r has s
Manoj Nahar wrote:
see this link
http://dev.mysql.com/downloads/connector/j/3.0.html
official mysql jdbc driver.
PS. Give google a chance.
On Sun, 12 Sep 2004 15:52:12 +0200, Daniel Schierbeck <[EMAIL PROTECTED]> wrote:
I'm sorry if this is off-topic, but i figured this was the best p
ysql.com,
but i couldn't find anything (i might just be stupid ;)).
Hope some of you know :)
PS. And thanks to the guy that recommended Eclipse in this list - it rocks!
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
uot;
Changed to "It was red" from "It had some Foo"
Changed to "It had some Foo" from "Underneath its Foobar"
Added "Underneath its Foobar"
Where the second, third and fourth line is wrong - i added a line
between "There was a Bar" and "It had some Foo"...
How should i do this?
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
utomatic
expiration function, but still, wouldn't it be a drag for the server?
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/contact.html
Thanks, I'll look into it. Also the CVS-in-PHP thing.
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
7;s easier to use XML or
something else, that'll be fine with me (as long as it's generally
available).
Thank you in advance guys :)
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
John Nichel wrote:
Daniel Schierbeck wrote:
Hey Daniel, do me a favor if you would, and add a year to the date on
your computer. Thanks.
Oooops... Sorry, i have a crappy, ehh, "legal" *cough* version of Adobe
Photoshop, it won't work unless i put the time on my PC back a year,
Daniel Schierbeck wrote:
[EMAIL PROTECTED] wrote:
Thanks Anders and Daniel. Daniel, I like your approach. I want to make
it as
secure as possible. I'm going to place the files outside the web
directory
and use authentication to approve that the user can download some
particular
song. I d
o a forced download. I will definitely have
to try that. Thanks again.
Nilaab
It seems that you can just replace the content-type of my previous
example with:
audio/mpegurl
That should force a stream (haven't tested it though).
Good luck
--
Daniel Schierbeck
--
PHP General Mai
o a forced download. I will definitely have
to try that. Thanks again.
Nilaab
No problem mate, and by the way, i think a friend of mine has a site
that streams mp3 files - I'll ask him out about it.
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: htt
-
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://w
27;t hesitate! This limited-time opportunity to discover his secrets will only be
available for a few more days!
Sincerely,
theeb basheer
Mooo!
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Encoding: binary');
readfile('songs/' . $file . 'mp3');
exit();
?>
Also, if I wanted them
to listen to streamed music does PHP have any specialized functions I could
use to achieve that?
You should take a look at the Ming library and the mp3 stre
e absolutely no idea what that is... What happened to the good old
clean install.exe files?! Should i install that wampp thing? (i hope
it's not some twisted virus :x)
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
() is to
check whether or not a variable exists!
So far there has been two suggestions as to what can be done:
1. Change isset so that it automatically detects
overloaded properties
2. Let the user define a custom __isSet() method, similar to the
one above, that is called each tim
John Holmes wrote:
From: "Daniel Schierbeck" <[EMAIL PROTECTED]>
Is there a simpler way of approaching this?
Use an already written program that parses your web logs and already
gives you this information?
---John Holmes...
I feel like doing it myself :)
--
Daniel Schierbec
tart) ORDER
BY MONTH(visit_start)";
break;
// More cases
default:
return FALSE;
}
return $db->query("SELECT COUNT(DISTINCT ip) AS visitors, COUNT(*) AS
visits, SUM(hits) AS hits FROM `statistics` WHERE " . $sql)->fetchArray();
}
}
?>
Is there
27; on php.net to see the full
documentation.
But it only works in PHP5 ;)
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
}
$o = new OO();
echo isset($o->a) ? "yes\n" : "no\n";
echo isset($o->b) ? "yes\n" : "no\n";
echo is_null($o->a) ? "yes\n" : "no\n";
echo is_null($o->b) ? "yes\n" : "no\n";
?>
I ex
es
But got this:
no
no
no
yes
It looks like isset() can't handle object properties correctly. I'll
post the bug on php.net.
--
Daniel Schierbeck
Next time, please read my post carefully. $a is not NULL, it is 1.
Therefore, isset($a) should return TRUE, which it does normally, just
?>
I expected something like this:
yes
no
no
yes
But got this:
no
no
no
yes
It looks like isset() can't handle object properties correctly. I'll
post the bug on php.net.
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
r prior to a header. Either send the header before you send the
HTML or use output buffering, eg.:
...
include '...';
// Blabla
?>
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Frzzman wrote:
Daniel Schierbeck wrote:
Stefan wrote:
It's a bug.
* Siehe http://bugs.php.net/bug.php?id=28444 ... und ...
* http://news.php.net/php.bugs/63652
A workaround is possible using __call( $name, $args) { return(
$this->__get( $name)); }. But it sucks, since co
sible as $obj->not_existing_attr()[0]
regards
Daniel Schierbeck wrote:
Do you guys have any idea why this code:
class Foo
{
private $elem = array();
public function __get ($prop)
{
if (isset($this->elem[$prop])) {
return $th
property access in ... on line 24
Where line 24 is:
$obj->a->b= "Foobar";
?
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
is a number
same way goes for accessing them
In PHP5, the square brackets have been replaced with the curly ones (the
square brackets still works, but it's deprecated)
$string = "12345";
echo $string{2}; // 3
--
Daniel Schierbeck
--
PHP General Mailing List (htt
Ron Clark wrote:
Daniel Schierbeck wrote:
Ron Clark wrote:
Capture the output in the $output variable then ob_clean to empty the
output buffer before printing the the desired message.
ob_get_clean() is preferable:
$output = ob_get_clean(); // Gets the buffered output and cleans
the buffer
st in case you change the
class' name.
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
:0:{}
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
a:1:{s:3:"foo";s:3:"bar";}
Anyone know why my header() output behaves so funky?
Thanks,
Eric
Try to use unserialize();
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
)."\n";
Add this to the class as well:
public function __clone ()
{
self::$instances++; // You might as well use the "self" operator
}
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ron Clark wrote:
Capture the output in
the $output variable then ob_clean to empty the output buffer before
printing the the desired message.
ob_get_clean() is preferable:
$output = ob_get_clean(); // Gets the buffered output and cleans the buffer
--
Daniel Schierbeck
--
PHP General
Php Junkie wrote:
Ave,
I'm facing a little problem.
I have created a File Manager Application for my company which has a place
where authorized users can download the stored files. The files are of
various MIME Types.. Mainly PDF, TXT & DOC.
What I want to do is basically... When the user clicks on
Michael Purdy wrote:
Folks
I am running php 5.0.1 on NT.
I have a small test script as shown below
setcookie('cat','large',time()+3600);
setcookie('dog','small',time()+3600);
The outcome of this script is that only the LAST cookie is successfully stored.despite
having a different
name. I
Curt Zirzow wrote:
* Thus wrote Justin Patrin:
On Sun, 22 Aug 2004 13:04:11 +0200, Daniel Schierbeck <[EMAIL PROTECTED]> wrote:
...
Note: Parent constructors are not called implicitly. In order
to run a parent constructor, a call to parent::__construct() is
required.
I
L0t3k wrote:
Raffael,
object in PHP5 _are_ passed by reference. internally, objects are
handles unique to a request, so all youre doing is passing a handle around.
note, however, that simple variable access will _always_ be faster than
method calls. this is true in C as well as PHP, except in P
Phpu wrote:
Hi,
I have a file, test.txt. The containig of this file is:
line 1
line 2
line 3
--
and so on
I want to create a script that will read each line of the file and insert it to
database.
I am new to php and maybe you could help me
Thanks
I depends on what kind of database you wish to
Raffael Wannenmacher wrote:
hello together
look at the following code ...
why is this ..
-- code start
if ( is_object($this->getManagerObject()->getDataFieldManager()) )
{
for ( $j = 0; $j <
$this->getManagerObject()->getDataFieldManager()->getCount(); $j++ )
{
Hello there. I was experimenting a bit with the constructors and
destructors, and found that this code:
class First
{
public function __construct ()
{
echo "Hello, World!\n";
}
Robert Cummings wrote:
On Sat, 2004-08-21 at 14:38, Daniel Schierbeck wrote:
Robert Cummings wrote:
In PHP5 to get a copy of, versus a reference to, an object the developer
must call the __clone() method for the target object:
$obj = new Foo();
$copyNotReference = $obj->__clone();
Robert Cummings wrote:
In PHP5 to get a copy of, versus a reference to, an object the developer
must call the __clone() method for the target object:
$obj = new Foo();
$copyNotReference = $obj->__clone();
The correct syntax for that is:
$obj = new Foo;
$copyNotReference = cl
Rick Fletcher wrote:
Daniel Schierbeck wrote:
I am having some problems with the XML features (I use the fancy new
SimpleXML). It works like a dream when I'm retrieving information from
an XML document, but when I want to insert new tags it screws up. I'm
trying to create a function
1 - 100 of 103 matches
Mail list logo