[PHP] Renaming Directories

2005-03-21 Thread Daniel Schierbeck
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

[PHP] Re: Renaming Directories

2005-03-21 Thread Daniel Schierbeck
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 names consist

Re: [PHP] Suggestion for IN()

2004-10-01 Thread Daniel Schierbeck
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()',

Re: [PHP] Suggestion for IN()

2004-10-01 Thread Daniel Schierbeck
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 $var $max; return in_array($needle

Re: [PHP] Naming conventions

2004-10-02 Thread Daniel Schierbeck
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() -- PHP

[PHP] Re: set multiple variables

2004-10-03 Thread Daniel Schierbeck
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 to specify

Re: [PHP] Re: set multiple variables

2004-10-03 Thread Daniel Schierbeck
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't

[PHP] Re: output a PDF, over header(). causes corruption on the file?

2004-10-04 Thread Daniel Schierbeck
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

Re: [PHP] Referencing a constant class variable

2004-10-06 Thread Daniel Schierbeck
): class MyClass { public static $myClassVar = Bob; } echo MyClass::$myClassVar; // Bob -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] Re: Mac OS X and Editor

2004-10-20 Thread Daniel Schierbeck
(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/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Mac OS X and Editor

2004-10-20 Thread Daniel Schierbeck
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/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP5 CLI Custom Error Reporting Doesn't Work as Expected

2004-10-24 Thread Daniel Schierbeck
(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. -- Daniel Schierbeck Help spread Firefox

[PHP] Re: overiding functions (constructors mostly)

2004-10-24 Thread Daniel Schierbeck
) { // bar } } -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: overiding functions (constructors mostly)

2004-10-25 Thread Daniel Schierbeck
); //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 difficulties. -- Daniel Schierbeck Help spread

Re: [PHP] Re: overiding functions (constructors mostly)

2004-10-25 Thread Daniel Schierbeck
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/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

[PHP] Re: PHP Crypt on MacOSX

2004-10-25 Thread Daniel Schierbeck
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') LIMIT 1 -- Daniel Schierbeck Help spread Firefox

[PHP] Re: best php script that counts current online users, question.

2004-10-26 Thread Daniel Schierbeck
rows that are more than 5 or so minutes old. -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Matching *exact* string?

2004-10-31 Thread Daniel Schierbeck
, 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/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Matching *exact* string?

2004-10-31 Thread Daniel Schierbeck
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 in the ban list

[PHP] Re: GUI editor for php?

2004-11-02 Thread Daniel Schierbeck
. 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/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: VOTE TODAY

2004-11-02 Thread Daniel Schierbeck
'Didn\'t see *that* one coming, did you?'; } -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: VOTE TODAY

2004-11-03 Thread Daniel Schierbeck
: 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 spread Firefox (www.getfirefox.com): http

Re: [PHP] VOTE TODAY

2004-11-03 Thread Daniel Schierbeck
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/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

[PHP] Re: blank function parameters

2004-11-03 Thread Daniel Schierbeck
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'; } } -- Daniel

[PHP] Re: blank function parameters

2004-11-03 Thread Daniel Schierbeck
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 which works ok

[PHP] Re: Question: Passing error messages

2004-11-06 Thread Daniel Schierbeck
()) { 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 spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user

Re: [PHP] Re: Question: Passing error messages

2004-11-06 Thread Daniel Schierbeck
. 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/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: User's language settings

2004-11-08 Thread Daniel Schierbeck
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 spread Firefox (www.getfirefox.com): http

Re: [PHP] User's language settings

2004-11-08 Thread Daniel Schierbeck
if you let the visitors decide. -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Silly OOP question

2004-11-14 Thread Daniel Schierbeck
) { // ... } public function deleteProject ($id) { // ... } } -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Test post from a new client

2004-11-14 Thread Daniel Schierbeck
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/registerr

[PHP] Re: Silly OOP question

2004-11-14 Thread Daniel Schierbeck
be happy. -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Silly OOP question

2004-11-14 Thread Daniel Schierbeck
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 Firefox

[PHP] Re: Simple coding question

2004-11-19 Thread Daniel Schierbeck
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 spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP

[PHP] Tabs or Spaces?

2004-11-21 Thread Daniel Schierbeck
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 Firefox

[PHP] Re: Tabs or Spaces?

2004-11-22 Thread Daniel Schierbeck
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 mean to start

[PHP] Re: How to $_POST from a grid

2004-11-24 Thread Daniel Schierbeck
that good with JavaScripts. -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Text Parser

2004-11-24 Thread Daniel Schierbeck
the first word, and before the last one. 3) Return that string. [/snip] $old = name age address location; $new = str_replace( , ,, $old); Why not go with 4 strings? If the string is like this it won't work as intended: $string = 'John Doe Fooroad 11 35 US'; // John,Doe,Fooroad,11,35,US -- Daniel

Re: [PHP] Text Parser

2004-11-24 Thread Daniel Schierbeck
! Lootin' time! Arrr! -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Happy Thanksgiving

2004-11-25 Thread Daniel Schierbeck
! 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/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Getting static member for a class which name is stored in a variable

2004-11-25 Thread Daniel Schierbeck
'; 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/registerr=6584 -- PHP General Mailing List (http

[PHP] Re: Getting static member for a class which name is stored in a variable

2004-11-26 Thread Daniel Schierbeck
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/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] Re: Close all open tags in HTML text

2004-12-09 Thread Daniel Schierbeck
. Is there 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

Re: [PHP] Close all open tags in HTML text

2004-12-12 Thread Daniel Schierbeck
: absolute; width: 100%; height: 100%; top: 0; left: 0; right: 0; bottom: 0; background-color: red;/div -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] PHP cross platform IDE

2004-12-14 Thread Daniel Schierbeck
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/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] Re: nntp://news.php.net -- read only?

2004-12-17 Thread Daniel Schierbeck
? 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/registerr=6584 -- PHP General

[PHP] Re: Replacing whole words only

2004-12-22 Thread Daniel Schierbeck
Chris Boget wrote: Is there a way to replace/remove *whole* words from a phrase? For example: ? $exceptionsList = array( 'the', 'other', 'that', 'a' ); $stringToParse = 'The other lady that laughed'; if( count( $exceptionsList ) 0 ) { foreach( $exceptionsList as $exceptionPhrase ) {

[PHP] Re: wrong value from define

2004-12-29 Thread Daniel Schierbeck
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

Re: [PHP] How to argue with ASP people...

2004-12-30 Thread Daniel Schierbeck
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

[PHP] Re: PHP College Scholarships?

2005-01-10 Thread Daniel Schierbeck
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

Re: [PHP] Get name of extending class with static method call

2005-01-11 Thread Daniel Schierbeck
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(); }

Re: [PHP] Re: Get name of extending class with static method call

2005-01-11 Thread Daniel Schierbeck
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 { }

[PHP] SimpleXML

2004-08-19 Thread Daniel Schierbeck
Hello there, I'm new to all this newsgroup stuff, so please tell me if I'm putting this in the wrong place. 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

[PHP] Overloaded Class The __tostring() Method

2004-08-20 Thread Daniel Schierbeck
I am trying to build an XML-formatted string from an object. I use this code: ?php class XML_Object { private $childs = array(); public function __get ($prop) { if (isset($this-childs[$prop])) {

Re: [PHP] Overloaded Class The __tostring() Method

2004-08-20 Thread Daniel Schierbeck
John Holmes wrote: - Original Message - From: Daniel Schierbeck [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 20, 2004 10:47 AM Subject: [PHP] Overloaded Class The __tostring() Method I am trying to build an XML-formatted string from an object. I use this code: ?php

Re: [PHP] SimpleXML

2004-08-20 Thread Daniel Schierbeck
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 that saves

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Daniel Schierbeck
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 =

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Daniel Schierbeck
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(); The correct

[PHP] Class Con- and Destructor Inheritance

2004-08-22 Thread Daniel Schierbeck
Hello there. I was experimenting a bit with the constructors and destructors, and found that this code: ?php class First { public function __construct () { echo Hello, World!\n; }

[PHP] Re: OO in PHP5.0 - Referencing Object or not?!

2004-08-22 Thread Daniel Schierbeck
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++ ) {

[PHP] Re: Text from file into database

2004-08-22 Thread Daniel Schierbeck
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

[PHP] Re: OO in PHP5.0 - Referencing Object or not?!

2004-08-22 Thread Daniel Schierbeck
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

Re: [PHP] Class Con- and Destructor Inheritance

2004-08-23 Thread Daniel Schierbeck
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

[PHP] Re: Cookie behaviour

2004-08-23 Thread Daniel Schierbeck
Michael Purdy wrote: Folks I am running php 5.0.1 on NT. I have a small test script as shown below script language=php setcookie('cat','large',time()+3600); setcookie('dog','small',time()+3600); /script The outcome of this script is that only the LAST cookie is successfully stored.despite

Re: [PHP] How do I open Save As Dialog Box?

2004-08-23 Thread Daniel Schierbeck
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

Re: [PHP] system command

2004-08-24 Thread Daniel Schierbeck
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

Re: [PHP] how to count objects instances

2004-08-24 Thread Daniel Schierbeck
() { 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

[PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug?

2004-08-24 Thread Daniel Schierbeck
value=blah /form /body /html 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

Re: [PHP] how to count objects instances

2004-08-24 Thread Daniel Schierbeck
the class' name. -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] system command

2004-08-24 Thread Daniel Schierbeck
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

[PHP] Re: exploding

2004-08-26 Thread Daniel Schierbeck
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 (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] Object Overloading in PHP5

2004-08-28 Thread Daniel Schierbeck
is: $obj-a-b= Foobar; ? -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Object Overloading in PHP5

2004-08-28 Thread Daniel Schierbeck
as $obj-not_existing_attr()[0] regards Daniel Schierbeck wrote: Do you guys have any idea why this code: ?php class Foo { private $elem = array(); public function __get ($prop) { if (isset($this-elem[$prop])) { return $this-elem[$prop

Re: [PHP] Object Overloading in PHP5

2004-08-29 Thread Daniel Schierbeck
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 constructs

Re: [PHP] Storing image in database

2004-08-30 Thread Daniel Schierbeck
... ?php include '...'; // Blabla ? -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: [PHP5]__get, __set and isset()

2004-08-31 Thread Daniel Schierbeck
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

[PHP] Re: [PHP5]__get, __set and isset()

2004-08-31 Thread Daniel Schierbeck
; 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 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

Re: [PHP] Re: [PHP5]__get, __set and isset()

2004-08-31 Thread Daniel Schierbeck
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 -- === Frederic HARDYEmail: [EMAIL PROTECTED] HEXANET SARL

[PHP] Re: Handling XML output in a slim way

2004-09-01 Thread Daniel Schierbeck
or as an XML-formatted string. Search for 'simplexml' 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

[PHP] Statistics

2004-09-02 Thread Daniel Schierbeck
; } return $db-query(SELECT COUNT(DISTINCT ip) AS visitors, COUNT(*) AS visits, SUM(hits) AS hits FROM `statistics` WHERE . $sql)-fetchArray(); } } ? Is there a simpler way of approaching this? -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Statistics

2004-09-02 Thread Daniel Schierbeck
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 Schierbeck -- PHP General Mailing

Re: [PHP] [PHP5] paradox ? Bug ?

2004-09-03 Thread Daniel Schierbeck
define a custom __isSet() method, similar to the one above, that is called each time a property of the class is checked with isset() Maybe there's some other angles/ideas/suggestions? -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] PHP IDE for OS X

2004-09-04 Thread Daniel Schierbeck
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

Re: [PHP] PHP5 - How Do I Let Users Download Music Files?

2004-09-05 Thread Daniel Schierbeck
that? You should take a look at the Ming library and the mp3 stream function (http://www.php.net/manual/en/function.swfmovie.streammp3.php). It's a bit tricky though, but i can't think of anything else. -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

[PHP] Re: tool to increase your web sites profitability

2004-09-05 Thread Daniel Schierbeck
! -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: ERROR IN THIS CODE

2004-09-05 Thread Daniel Schierbeck
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://www.php.net/unsub.php Try using $_GET['id'] instead of $id. -- Daniel Schierbeck -- PHP General Mailing List (http

Re: [PHP] PHP5 - How Do I Let Users Download Music Files?

2004-09-06 Thread Daniel Schierbeck
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: http://www.php.net

Re: [PHP] PHP5 - How Do I Let Users Download Music Files?

2004-09-06 Thread Daniel Schierbeck
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 Mailing List (http

Re: [PHP] PHP5 - How Do I Let Users Download Music Files?

2004-09-06 Thread Daniel Schierbeck
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 didn't

Re: [PHP] PHP5 - How Do I Let Users Download Music Files?

2004-09-06 Thread Daniel Schierbeck
John Nichel wrote: Daniel Schierbeck wrote: snip 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

[PHP] Multi-User Text-Editing

2004-09-06 Thread Daniel Schierbeck
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

Re: [PHP] Multi-User Text-Editing

2004-09-06 Thread Daniel Schierbeck
, 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

Re: [PHP] Multi-User Text-Editing

2004-09-06 Thread Daniel Schierbeck
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

Re: [PHP] Multi-User Text-Editing

2004-09-07 Thread Daniel Schierbeck
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

[PHP] JDBC Driver for MySQL

2004-09-12 Thread Daniel Schierbeck
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

Re: [PHP] JDBC Driver for MySQL

2004-09-12 Thread Daniel Schierbeck
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 place to ask

[PHP] Re: iguanahost - anyone else being plagued?

2004-09-16 Thread Daniel Schierbeck
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

[PHP] Highest Key in an Array

2004-09-17 Thread Daniel Schierbeck
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, in this case, returns 43. Daniel Schierbeck -- PHP General Mailing List

Re: [PHP] Highest Key in an Array

2004-09-17 Thread Daniel Schierbeck
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've

Re: [PHP] Highest Key in an Array

2004-09-17 Thread Daniel Schierbeck
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

  1   2   >