[PHP] test

2003-08-16 Thread adam
tst -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] call function as variable

2003-08-16 Thread adam
Hi! I have folowing function which they are a member in a class. function foo(){ something } function zoo(){ something else } and i have a array such: $test = array(1=foo,2=zoo); and i want to call the fuction foo() and zoo something like; $object-$test[1](); I have tried this this, it will

[PHP] Re: How do I call a function in a Class from another function inthe same class

2003-08-16 Thread adam
typically problem! have you used $this-tehotherfunction(); or just use therotherfunction();??? if you call from your class to a members method , you have use $this!!! And read more about oo-method! cheers Donpro wrote: Hi, I have two functions in a class where one calls the other. When

php-general Digest 16 Aug 2003 08:16:35 -0000 Issue 2239

2003-08-16 Thread php-general-digest-help
php-general Digest 16 Aug 2003 08:16:35 - Issue 2239 Topics (messages 159743 through 159789): Re: Segmentation Fault 159743 by: Jay Blanchard 159758 by: Curt Zirzow Checkboxes 159744 by: Cesar Aracena 159745 by: Matt Babineau 159746 by: Cesar Aracena

[PHP] How to connect to DB

2003-08-16 Thread murugesan
Hello all, I have some existing php pages already. Now I want to change the DB to point to another DB. I have changed the include_path in php.ini file to point to /home/config Also I changed the constant db_name defined in a file in /home/config/con.php to point to new DB. [snip]

Re: [PHP] call function as variable

2003-08-16 Thread John W. Holmes
adam wrote: Hi! I have folowing function which they are a member in a class. function foo(){ something } function zoo(){ something else } and i have a array such: $test = array(1=foo,2=zoo); and i want to call the fuction foo() and zoo something like; $object-$test[1](); Try:

[PHP] better understanding of ereg_replace and other functions

2003-08-16 Thread Binay Agarwal
Hi everybody, Lot of places in manual i came across using ereg_replace or ereg is very resource intensive and hence its better to use preg_replace or str_replace or strpos if they do the jobs. Now i am very curious to look at the source code (implementation) of these function so as to be able

RE: [PHP] better understanding of ereg_replace and other functions

2003-08-16 Thread Boaz Yahav
Try these : preg_replace http://www.weberdev.com/AdvancedSearch.php?searchtype=examplesort=examp leexample=preg_replace str_replace http://www.weberdev.com/AdvancedSearch.php?searchtype=examplesort=examp leexample=str_replace strpos

[PHP] preg_replace question

2003-08-16 Thread Jean-Christian IMbeault
I found this nice preg_replace function that replaces all occurrences of an HTML anchor (a href=...) with a link to another PHP script that log the link and then sends the user on his merry way to the the appropriate page/site: preg_replace( #a href=(\|')http://([^\']+)(\|')#ime, 'a

Re: [PHP] preg_replace question

2003-08-16 Thread [EMAIL PROTECTED]
Then use a simple strstr to first find out if the string does contain mydomain.com :-) Jean-Christian IMbeault wrote: I found this nice preg_replace function that replaces all occurrences of an HTML anchor (a href=...) with a link to another PHP script that log the link and then sends the

[PHP] imagecreatefromjpeg() problems

2003-08-16 Thread J-K
Hi! I've made a little script to make thumbnails which worked before the summer, but now I get this errormessage: bFatal error/b: Call to undefined function: imagecreatefromjpeg() in b/usr/local/others/www.stud.users/mark/gfx/create_tn.php/b on line b15/b First I

Re: [PHP] call function as variable

2003-08-16 Thread adam
I got this error: Parse error: parse error, unexpected '{' in ... Cheers John W. Holmes wrote: adam wrote: Hi! I have folowing function which they are a member in a class. function foo(){ something } function zoo(){ something else } and i have a array such: $test = array(1=foo,2=zoo);

Re: [PHP] call function as variable

2003-08-16 Thread David Otton
On Sat, 16 Aug 2003 07:58:27 +0200, you wrote: I have folowing function which they are a member in a class. function foo(){ something } function zoo(){ something else } and i have a array such: $test = array(1=foo,2=zoo); and i want to call the fuction foo() and zoo something like;

Re: [PHP] call function as variable

2003-08-16 Thread Michael Sims
On Sat, 16 Aug 2003 07:58:27 +0200, you wrote: $test = array(1=foo,2=zoo); and i want to call the fuction foo() and zoo something like; $object-$test[1](); I've never used this myself, but this should work: call_user_func($object, $test[1]); See:

Re: [PHP] call function as variable

2003-08-16 Thread adam
Tanks a lot! this is exactly that i want!! Cheers Michael Sims wrote: On Sat, 16 Aug 2003 07:58:27 +0200, you wrote: $test = array(1=foo,2=zoo); and i want to call the fuction foo() and zoo something like; $object-$test[1](); I've never used this myself, but this should work:

Re: [PHP] call function as variable

2003-08-16 Thread adam
Tanks a lot! This was exactly that i wanted! Cheers David Otton wrote: On Sat, 16 Aug 2003 07:58:27 +0200, you wrote: I have folowing function which they are a member in a class. function foo(){ something } function zoo(){ something else } and i have a array such: $test = array(1=foo,2=zoo);

[PHP] pop3 functions

2003-08-16 Thread andu
Someone asked for the pop3 functions I put togather (lost your message), please contact me off list, It works fine with my server but no guaranties though there should be no problems. I take the opportunity to express my 2 major problems I found with php in the 2 months I've been using it. First

RE: [PHP] better understanding of ereg_replace and other functions

2003-08-16 Thread Wouter van Vliet
You can just download the source distribution of php, and on a linux commandline do: grep -inr preg_replace * You'll find all occurances of preg_replace, including it's declaratin, which I have copies below. It seems like it's being passed thru to another function .. Which is also on the same

Re: [PHP] Installing How-To

2003-08-16 Thread Jaap van Ganswijk
At 2003-08-15 15:12 -1000, Rodney Davis wrote: Does anyone know of a good howto on installing php w/ GD and phplib etc on a Redhat box? I have just upgraded my (Mandrake) system by doing: - Upgrading from Mandrake 9.0 to 9.1 using the CD's that came with the UK Linux Format magazine of june

php-general Digest 16 Aug 2003 20:20:29 -0000 Issue 2240

2003-08-16 Thread php-general-digest-help
php-general Digest 16 Aug 2003 20:20:29 - Issue 2240 Topics (messages 159790 through 159804): How to connect to DB 159790 by: murugesan Re: call function as variable 159791 by: John W. Holmes 159797 by: adam 159798 by: David Otton 159799 by: Michael

Re: [PHP] redhat 8: upgrade php from 4.2.2 to 4.3.2

2003-08-16 Thread Jaap van Ganswijk
At 2003-08-15 09:31 -0700, Chris W. Parker wrote: Hello eveyone. I want to upgrade my php install from 4.2.2 to 4.3.2. I'm pretty new to linux so I don't know how to install from source and I haven't been able to find any Redhat 8 rpm's. Can someone please give me instructions as to what I

[PHP] Sessions

2003-08-16 Thread Peda
Hi!! I have some problem on my site. When I'm using this PHP script: ?php session_start(); session_register( aUser, aAccount ); $aUser = Cidnie; $aAccount = 1016; ? html head titleGetting Started With Sessions: Page 1/title /head body ?php print( Current User:

Re: [PHP] Sessions

2003-08-16 Thread Jaap van Ganswijk
At 2003-08-16 23:28 +0200, Peda wrote: I have some problem on my site. When I'm using this PHP script: ?php session_start(); session_register( aUser, aAccount ); $aUser = Cidnie; $aAccount = 1016; ? ?php print( Current User: $aUser ); print( Current Account: $aAccount );

Re: [PHP] imagecreatefromjpeg() problems

2003-08-16 Thread Jaap van Ganswijk
At 2003-08-16 14:35 +0200, J-K wrote: I've made a little script to make thumbnails which worked before the summer, but now I get this errormessage: bFatal error/b: Call to undefined function: imagecreatefromjpeg() in b/usr/local/others/www.stud.users/mark/gfx/create_tn.php/b on line b15/b First

Re: [PHP] Sessions

2003-08-16 Thread Curt Zirzow
* Thus wrote Jaap van Ganswijk ([EMAIL PROTECTED]): At 2003-08-16 23:28 +0200, Peda wrote: When you have a shell login, try this: - cd /tmp - chown . your_user_name This probably gives an error warning. - chmod u+rw . Don't set your /tmp directoy to those settings. /tmp is a system

Re: [PHP] better understanding of ereg_replace and other functions

2003-08-16 Thread Curt Zirzow
* Thus wrote Binay Agarwal ([EMAIL PROTECTED]): Hi everybody, Lot of places in manual i came across using ereg_replace or ereg is very resource intensive and hence its better to use preg_replace or str_replace or strpos if they do the jobs. I believe the use of ereg_replace in the

Re: [PHP] Sessions

2003-08-16 Thread Jaap van Ganswijk
At 2003-08-16 22:45 +, Curt Zirzow wrote: * Thus wrote Jaap van Ganswijk ([EMAIL PROTECTED]): At 2003-08-16 23:28 +0200, Peda wrote: When you have a shell login, try this: - cd /tmp - chown . your_user_name This probably gives an error warning. - chmod u+rw . Don't set your /tmp

RE: [PHP] Sessions

2003-08-16 Thread Wouter van Vliet
As others have pointed out already, your problem indeed is about not being able to write in the tmp directory. Also, as others have pointed out, if it's not your server you would not be able to change file permissions of the /tmp directory. Your solution is probably found in changing the path

[PHP] Have I over done this?

2003-08-16 Thread John Taylor-Johnston
Have I over done this? Can I clean up this code any? I have two states 1) Admin mode 2) Normal mode in Normal mode, I have two states: a) student is not in the database a) student is in the database and has likely reloaded the browser. I'm trying to avoid multiple entries with the same

Re: [PHP] better understanding of ereg_replace and other functions

2003-08-16 Thread Jaap van Ganswijk
At 2003-08-16 23:05 +, Curt Zirzow wrote: * Thus wrote Binay Agarwal ([EMAIL PROTECTED]): Hi everybody, Lot of places in manual i came across using ereg_replace or ereg is very resource intensive and hence its better to use preg_replace or str_replace or strpos if they do the jobs.

Re: [PHP] Sessions

2003-08-16 Thread Curt Zirzow
* Thus wrote Jaap van Ganswijk ([EMAIL PROTECTED]): At 2003-08-16 22:45 +, Curt Zirzow wrote: * Thus wrote Jaap van Ganswijk ([EMAIL PROTECTED]): At 2003-08-16 23:28 +0200, Peda wrote: When you have a shell login, try this: - cd /tmp - chown . your_user_name This probably

Re: [PHP] Sessions

2003-08-16 Thread Jason Sheets
Just a note, in most cases where you have your own private /tmp it is not the same /tmp PHP uses. You are in a chrooted or jailed environment with a virtual /tmp where usually Apache runs outside this restricted environment , the biggest reason being running a seperate set of Apache processes

[PHP] [php] explode that :) !

2003-08-16 Thread John Taylor-Johnston
$P1OC1Q1 = 1¶some text or some comment; echo trtdYour score is: /tdtd; $score=split($P1OC1Q1,¶); echo $score[0]./td/tr\n; Do I have to go through all that to get score[0] ? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [php] explode that :) !

2003-08-16 Thread [EMAIL PROTECTED]
Looks like a really simple piece of code except for the cryptic variable names. John Taylor-Johnston wrote: $P1OC1Q1 = 1¶some text or some comment; echo trtdYour score is: /tdtd; $score=split($P1OC1Q1,¶); echo $score[0]./td/tr\n; Do I have to go through all that to get score[0] ? John

Re: [PHP] [php] explode that :) !

2003-08-16 Thread John Taylor-Johnston
Kind of hoping to do shorten it like this: echo trtdYour score is: /tdtd.$score[0]=split($P1OC1Q1,¶)./td/tr\n; No such hopes? Looks like a really simple piece of code except for the cryptic variable names. $P1OC1Q1 = 1¶some text or some comment; echo trtdYour score is: /tdtd;

Re: [PHP] [php] explode that :) !

2003-08-16 Thread Mike Migurski
echo trtdYour score is: /tdtd; $score=split($P1OC1Q1,¶); echo $score[0]./td/tr\n; Do I have to go through all that to get score[0] ? I think reset(split()) should work for getting the first element. - michal migurski- contact

RE: [PHP] [php] explode that :) !

2003-08-16 Thread Sævar Öfjörð
Why not: echo trtdYour score is: /tdtd.split($P1OC1Q1,)./td/tr\n; -Original Message- From: John Taylor-Johnston [mailto:[EMAIL PROTECTED] Sent: 17. ágúst 2003 03:48 To: [EMAIL PROTECTED] Subject: Re: [PHP] [php] explode that :) ! Kind of hoping to do shorten it like this: echo

Re: [PHP] [php] explode that :) !

2003-08-16 Thread John Taylor-Johnston
Why not: echo trtdYour score is: /tdtd.split($P1OC1Q1,¶)./td/tr\n; Ok, but what happens when $P1OC1Q1 = . It errors out. $P1OC1Q1 = ;#left blank $P1OC1Q2 = 1¶bunch of text; $P1OC1Q3 = 1¶bunch of text; $P1OC1Q4 = 1¶bunch of text; $P1OC1Q5 = 1¶bunch of text; $P1OC1Q6 = 1¶bunch of text; --

Re: [PHP] [php] explode that :) !

2003-08-16 Thread John Taylor-Johnston
Actually this does not work: echo split($P1OC1Q1,¶); There are two variables in $P1OC1Q1 = 1¶a bucnh of text I want to split $P1OC1Q1 and get 1 as a numeral for a calculation. I was looking for a cleaner way to do it. $P1OC1Q1 = 1¶some text or some comment; echo trtdYour score is: /tdtd;

[PHP] substr ?

2003-08-16 Thread John Taylor-Johnston
How can I find out if $mystring includes the character ¶? Thought substr would do it? J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php