php-general Digest 21 May 2001 01:01:49 -0000 Issue 698 Topics (messages 53608 through 53648): Re: Reversing htmlspecialchars() 53608 by: ~~~i LeoNid ~~ Re: Reports in web browser 53609 by: Miles Thompson Re: Unix problem 53610 by: Urb LeJeune ok, are servlets/jsp faster than php4? 53611 by: Christopher Leigh 53624 by: John Lim Re: PHP and XHTML 53612 by: Manuel Lemos 53620 by: Navid Yar 53626 by: Manuel Lemos 53627 by: Chris Sano Re: Book PHP4 Professional WROX & Mail over SMTP 53613 by: Manuel Lemos Re: Site search engine suggestion. 53614 by: Manuel Lemos 53617 by: Alok K. Dhir RegEx Question 53615 by: George E. Papadakis 53619 by: Christian Reiniger Re: [PHP-DEV] Fork() in php? 53616 by: Manuel Lemos 53631 by: Rasmus Lerdorf 53634 by: Richard Heyes 53636 by: Manuel Lemos 53637 by: Rasmus Lerdorf 53641 by: Manuel Lemos 53642 by: Rasmus Lerdorf 53643 by: Zak Greant 53647 by: Manuel Lemos include() in a file incuded() 53618 by: Jaime Torres 53623 by: George E. Papadakis 53625 by: Jaime Torres Image Functions and PHP 4.0.6 53621 by: Ryan Sommers 53639 by: Henrik Hansen porting problem 53622 by: Matt Broughton Re: Network Connectivity help please 53628 by: Chris Sano 53635 by: Don Read Re: HTTP socket connection 53629 by: phpman unset()- newbie question 53630 by: Tom Re: Uploading files 53632 by: James, Yz mail server (again!) 53633 by: FredrikAT Re: attachements in mail() 53638 by: Henrik Hansen COM objects 53640 by: John Skipsey Re: get all defined constants? 53644 by: Alex Black Email.. 53645 by: ddogbruce.home.com 53646 by: Peter Houchin - SunRentals Australia function to complete strings with white spaces on the left 53648 by: Carlos Fernando Scheidecker Antunes Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
On 19 May 2001 15:27:31 -0700 impersonator of [EMAIL PROTECTED] (=?iso-8859-1?Q?Rudi_Benkovi=E8?=) planted &I saw in php.general: > function un_htmlentities($str) { > $trans = get_html_translation_table (HTML_ENTITIES); > $trans = array_flip ($trans); > or for earlier php versions, that do not support array_flip() $trans=get_html_translation_table(HTML_ENTITIES); reset($trans); while(list($key,$value)=each($trans)){ $transs[$value]=$key; } $trans = &$transs; > $str = strtr ($str, $trans); > > return ($str); > } > >> -----Original Message----- >> From: Jeroen Geusebroek [mailto:[EMAIL PROTECTED]] >> Sent: Saturday, May 19, 2001 11:46 PM >> To: [EMAIL PROTECTED] >> Subject: [PHP] Reversing htmlspecialchars() >> >> >> Hi There, >> >> How can i reverse the htmlspecialchars() functions? >> I can't seem to find a function for that. >> >> Thanks, >> >> Jeroen Geusebroek >> >> -- >> PHP General ^^^ -- LeoN to e-mail: cut "auto_no." if present. (.±.) ` to think - is to speak quietly, to speak - is to think aloud` \~/ My posted articles archive: http://leo.portland.co.uk/doc00.htm
Well, I think there's a Javascript function one can use to start printing, but users will hate it. A bigger issue, I would think, would be formatting to preserve indents, column alignment ,etc. We have no control over the resolution of the user's system, size of the browser window, etc. Even extensive use of <PRE> tags is problematic. This would seem to be a good place to use pdf functions so that the generating system has complete control over the document. My two Canadian cents - Miles At 02:11 AM 5/20/01 +0200, Richard wrote: >You need to be more specific than that. > >You cannot demand the browser to start printing, only thing is to write the >contents of the report to a webpage and then the visitor/user can print it >out if she/he likes. > >It depends on how you have stored the reports. > >- Richard > >""Mihailo Dzigurski"" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello, > > > > I have written some accounting application using PHP, and now I need to > > create some reports. Those reports need to be printed from web browser. > > > > What can I do? > > > > Thanks > > Mihailo. > > > >
Bingo, he said as he slapped his forehead with open palm. Thanks a 10**6 Urb At 10:42 AM 5/20/01 +0200, Christian Reiniger wrote: >readdir returns the file/directory name without path, is_file and is_dir >expect a complete filenam with path. So unless you only examine your >current directory, is_file & is_dir won't find the files
ok, are servlets/jsp faster than php4? since zend cache isn't free... :(
Well if you had more RAM and a faster CPU, servlets/jsp would be faster :-) This link might not answer your question completely, but it could help... http://php.weblogs.com/jsp "Christopher Leigh" <[EMAIL PROTECTED]> wrote in message 000701c0e134$4223b800$01eea8c0@contrec">news:000701c0e134$4223b800$01eea8c0@contrec... > ok, are servlets/jsp faster than php4? > > > > since zend cache isn't free... :( >
Hello Navid, On 18-May-01 19:44:55, you wrote: >I would like to start using the XHTML syntax for my future projects, but I >heard that PHP is not compatible with XHTML. For example, in XHTML the ID >attribute is used in place of the deprecated NAME tag. But PHP depends on >the NAME attribute in forms, etc. Is there any way around this? Has anyone >used XHTML and PHP together successfully, and if so how did you get around >the previously mentioned problem? Any help woould be much appreciated, >thanks in advance. That's not a PHP problem. PHP just processes form values sent by the browser. It is up to the browser to pick the field names when the form is submitted. Anyway, I think that browsers will always pick the field names from the NAME attribute to keep backwards compatibility. Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --
Hello Manuel, So you suggest that I use the name attribute in XHTML and ignore the fact that it has been depreciated and replaced by the ID attribute? Will that solve my problem? Navid Yar -----Original Message----- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 20, 2001 11:49 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP and XHTML Hello Navid, On 18-May-01 19:44:55, you wrote: >I would like to start using the XHTML syntax for my future projects, but I >heard that PHP is not compatible with XHTML. For example, in XHTML the ID >attribute is used in place of the deprecated NAME tag. But PHP depends on >the NAME attribute in forms, etc. Is there any way around this? Has anyone >used XHTML and PHP together successfully, and if so how did you get around >the previously mentioned problem? Any help woould be much appreciated, >thanks in advance. That's not a PHP problem. PHP just processes form values sent by the browser. It is up to the browser to pick the field names when the form is submitted. Anyway, I think that browsers will always pick the field names from the NAME attribute to keep backwards compatibility. Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello Navid, On 20-May-01 14:36:33, you wrote: >So you suggest that I use the name attribute in XHTML and ignore the fact >that it has been depreciated and replaced by the ID attribute? Will that >solve my problem? It depends. If what is going to process the document is a regular browser, the NAME attribute is what matters. Future browsers will have to handle current HTML compatibly. So there is no point in removing the NAME attribute. BTW, you may want to look into this forms generation and validation class that outputs XHTML compatible code although it is up to the developer to specify the ID attribute or not. http://phpclasses.UpperDesign.com/browse.html/package/1 Manuel Lemos >Navid Yar >-----Original Message----- >From: Manuel Lemos [mailto:[EMAIL PROTECTED]] >Sent: Sunday, May 20, 2001 11:49 AM >To: [EMAIL PROTECTED] >Subject: Re: [PHP] PHP and XHTML >Hello Navid, >On 18-May-01 19:44:55, you wrote: >>I would like to start using the XHTML syntax for my future projects, but I >>heard that PHP is not compatible with XHTML. For example, in XHTML the ID >>attribute is used in place of the deprecated NAME tag. But PHP depends on >>the NAME attribute in forms, etc. Is there any way around this? Has anyone >>used XHTML and PHP together successfully, and if so how did you get around >>the previously mentioned problem? Any help woould be much appreciated, >>thanks in advance. >That's not a PHP problem. PHP just processes form values sent by the >browser. It is up to the browser to pick the field names when the form is >submitted. >Anyway, I think that browsers will always pick the field names from the >NAME attribute to keep backwards compatibility. >Regards, >Manuel Lemos >Web Programming Components using PHP Classes. >Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] >-- >E-mail: [EMAIL PROTECTED] >URL: http://www.mlemos.e-na.net/ >PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp >-- >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --
XHTML is just making your HTML documents XML ready. This means closing your tags, etc.. And Rasmus is right when he says PHP is 100% compatible with XHTML. -C <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > i won't pretend to be an XML guru, but isn't saying "php won't work with XHTML" akin to saying > "php won't work with javascript1.3, dhtml, netscape 6" etc? > php generates code...html, dhtml, whatever...i fail to see how php couldn't generate > what anyone would need for XHTML, or anything else along those lines.... > > -jack > > ----- Original Message ----- > From: Rasmus Lerdorf <[EMAIL PROTECTED]> > Date: Friday, May 18, 2001 6:59 pm > Subject: Re: [PHP] PHP and XHTML > > > > I would like to start using the XHTML syntax for my future > > projects, but I > > > heard that PHP is not compatible with XHTML. For example, in > > XHTML the ID > > > attribute is used in place of the deprecated NAME tag. But PHP > > depends on > > > the NAME attribute in forms, etc. Is there any way around this? > > Has anyone > > > used XHTML and PHP together successfully, and if so how did you > > get around > > > the previously mentioned problem? Any help woould be much > > appreciated,> thanks in advance. > > > > Completely false. PHP works fine with XHTML. > > > > -Rasmus > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: php-list- > > [EMAIL PROTECTED] > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hello Andreas, On 11-May-01 13:58:13, you wrote: >Hi there, >I bought this book tryed it for 2 days now to bring the Mail over SMTP >example to work. >It doesn' t work at all. >Does anybody have a class for sending E-Mails over SMTP? This really drives >me mad. It should not >be so complicated to send E-Mails over the net. Look here: http://phpclasses.UpperDesign.com/browse.html/package/14 http://phpclasses.UpperDesign.com/browse.html/package/9 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --
Hello elias, On 12-May-01 04:04:26, you wrote: >Hello guys, >I need that badly! I need a suggestion, advise, solution or whatever that >might help! >I need a Site Search script for a page that mostly have .PHP files some are >dynamic and some are not. >Basically i was using WebGlimpse but whenever I search using it, It shows >the source code of the PHP files! >So for example if i search "echo" , WebGlimpse displays the .PHP file source >code! >Any suggestion for a better site search program? Try HTDig with this PHP interface class: http://phpclasses.UpperDesign.com/browse.html/package/26 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --
The best open source search engines I've seen/used are: ASPSeek http://www.aspseek.org Mnogoseach http://mnogosearch.org/ ht://dig http://www.htdig.org I've found that I prefer ASPseek to both mnogo and htdig... > -----Original Message----- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]. net] On Behalf Of Manuel Lemos > Sent: Sunday, May 20, 2001 12:53 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Site search engine suggestion. > > > Hello elias, > > On 12-May-01 04:04:26, you wrote: > > >Hello guys, > > >I need that badly! I need a suggestion, advise, solution or whatever > >that might help! > > >I need a Site Search script for a page that mostly have .PHP > files some > >are dynamic and some are not. Basically i was using WebGlimpse but > >whenever I search using it, It shows the source code of the > PHP files! > >So for example if i search "echo" , WebGlimpse displays the > .PHP file source > >code! > > >Any suggestion for a better site search program? > > Try HTDig with this PHP interface class: > http://phpclasses.UpperDesign.com/browse.html/package/26 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi, I have an ereg question::. $data = a big string , while (ereg ("testing([^;]*);blah(.*)",$data,$args)) { $this = $args[1]; $data = $args[2]; } What I wanna do ,obviously, is to get all the strings between 'testng' and 'blah' in an array. This will do it, yet when it wont work when special chars such \n exist between 'testing' and 'blah'. Any ideas?
On Sunday 20 May 2001 19:18, George E. Papadakis wrote: > I have an ereg question::. > $data = a big string , > while (ereg ("testing([^;]*);blah(.*)",$data,$args)) { > $this = $args[1]; > $data = $args[2]; > } > > What I wanna do ,obviously, is to get all the strings between 'testng' > and 'blah' in an array. > This will do it, yet when it wont work when special chars such \n exist > between 'testing' and 'blah'. Use preg_match() with 's' or 'm' as modifier (one of these is correct...) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka", but "That's funny..." - Isaac Asimov
Hello Zeev, On 12-May-01 14:14:10, you wrote: >At 04:05 12/5/2001, Wez Furlong wrote: >>I know that there might be some bad interactions with apache if you fork, >>but if you allow PHP to spot that it forked and call _exit() instead of >>returning into the SAPI, you should be OK? >Not really, the parent has to somehow call wait() on the child, otherwise >you'd get zombie processes... >Generally, implementing that sort of stuff within the Apache framework is a >bit of asking for trouble :I Anyway, PHP really lacks of real multi-threading capabilities. Things like database connection pooling, (non-HTTP) server request handling, and GUI event processing could be properly implemented in PHP with multi-threading capabilities like the way it is done in Java, Perl, Python, etc. but can't be done right in PHP because it lacks multi-threading support. Any plans to add multi-threading capabilities to PHP? Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --
> >Not really, the parent has to somehow call wait() on the child, otherwise > >you'd get zombie processes... > >Generally, implementing that sort of stuff within the Apache framework is a > >bit of asking for trouble :I > > Anyway, PHP really lacks of real multi-threading capabilities. Things like > database connection pooling, (non-HTTP) server request handling, and GUI > event processing could be properly implemented in PHP with multi-threading > capabilities like the way it is done in Java, Perl, Python, etc. but can't > be done right in PHP because it lacks multi-threading support. > > Any plans to add multi-threading capabilities to PHP? Nope, but you can use the ticks feature to do some of this. -Rasmus
> Nope, but you can use the ticks feature to do some of this. Is there any documentation for this? I searched the manual and php.net but came up with nothing :( Cheers. -- Richard Heyes
Hello Rasmus, On 20-May-01 17:42:22, you wrote: >> >Not really, the parent has to somehow call wait() on the child, otherwise >> >you'd get zombie processes... >> >Generally, implementing that sort of stuff within the Apache framework is >> >a bit of asking for trouble :I >> >> Anyway, PHP really lacks of real multi-threading capabilities. Things like >> database connection pooling, (non-HTTP) server request handling, and GUI >> event processing could be properly implemented in PHP with multi-threading >> capabilities like the way it is done in Java, Perl, Python, etc. but can't >> be done right in PHP because it lacks multi-threading support. >> >> Any plans to add multi-threading capabilities to PHP? >Nope, but you can use the ticks feature to do some of this. Not very good. With ticks you never can run two PHP commands at the same time, like for instance executing two or more SQL queries at the same time. That is a shame for PHP because for instance in Java that is a breeze. Anyway, I was asking Zeev, will PHP ever have multi-threading capabilities? Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --
> On 20-May-01 17:42:22, you wrote: > > >> >Not really, the parent has to somehow call wait() on the child, otherwise > >> >you'd get zombie processes... > >> >Generally, implementing that sort of stuff within the Apache framework is > >> >a bit of asking for trouble :I > >> > >> Anyway, PHP really lacks of real multi-threading capabilities. Things like > >> database connection pooling, (non-HTTP) server request handling, and GUI > >> event processing could be properly implemented in PHP with multi-threading > >> capabilities like the way it is done in Java, Perl, Python, etc. but can't > >> be done right in PHP because it lacks multi-threading support. > >> > >> Any plans to add multi-threading capabilities to PHP? > > >Nope, but you can use the ticks feature to do some of this. > > Not very good. With ticks you never can run two PHP commands at the same > time, like for instance executing two or more SQL queries at the same time. > That is a shame for PHP because for instance in Java that is a breeze. > > Anyway, I was asking Zeev, will PHP ever have multi-threading capabilities? No, you asked the mailing list. Zeev's email address is [EMAIL PROTECTED] And no, PHP is unlikely to have multi-threading anytime soon. -Rasmus
Hello Rasmus, On 20-May-01 19:08:16, you wrote: >> On 20-May-01 17:42:22, you wrote: >> >> >> >Not really, the parent has to somehow call wait() on the child, >> >> >otherwise you'd get zombie processes... Generally, implementing that >> >> >sort of stuff within the Apache framework is a bit of asking for >> >> >trouble :I >> >> >> >> Anyway, PHP really lacks of real multi-threading capabilities. Things >> >> like database connection pooling, (non-HTTP) server request handling, >> >> and GUI event processing could be properly implemented in PHP with >> >> multi-threading capabilities like the way it is done in Java, Perl, >> >> Python, etc. but can't be done right in PHP because it lacks >> >> multi-threading support. >> >> >> >> Any plans to add multi-threading capabilities to PHP? >> >> >Nope, but you can use the ticks feature to do some of this. >> >> Not very good. With ticks you never can run two PHP commands at the same >> time, like for instance executing two or more SQL queries at the same time. >> That is a shame for PHP because for instance in Java that is a breeze. >> >> Anyway, I was asking Zeev, will PHP ever have multi-threading capabilities? >No, you asked the mailing list. Zeev's email address is [EMAIL PROTECTED] I believe the answer is of the interest of the mailing list. After all the thread was not started by me. >And no, PHP is unlikely to have multi-threading anytime soon. How can you be so sure? Weren't you the one that was saying that you opposed to the existence of a PHP compiler? Despite your opposition, Zeev and Andi brought it up to the joy of many PHP users. Since Zeev and Andi seem to be currently the most capable developers to bring multi-threading capability to PHP because they developed PHP current engine - Zend, my question still goes for them. After all they always seemed more reasonable and opened to my suggestions than you. Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --
> Weren't you the one that was saying that you opposed to the existence of a > PHP compiler? Despite your opposition, Zeev and Andi brought it up to the > joy of many PHP users. Well, it is not part of PHP. It isn't even free. > Since Zeev and Andi seem to be currently the most capable developers to bring > multi-threading capability to PHP because they developed PHP current engine > - Zend, my question still goes for them. After all they always seemed more > reasonable and opened to my suggestions than you. You are assuming they even read this mailing list. -Rasmus
Manuel wrote: [...] > Since Zeev and Andi seem to be currently the most capable developers to bring > multi-threading capability to PHP because they developed PHP current engine > - Zend, my question still goes for them. After all they always seemed more > reasonable and opened to my suggestions than you. Manuel, irritating Rasmus is not likely to make Andi, Zeev or any of the other developers more interested in helping you. If you want to ask about a possible feature, mail the PHP-DEV list or try mailing the PHP group. --zak
Hello Rasmus, On 20-May-01 20:22:48, you wrote: >> Weren't you the one that was saying that you opposed to the existence of a >> PHP compiler? Despite your opposition, Zeev and Andi brought it up to the >> joy of many PHP users. >Well, it is not part of PHP. It isn't even free. As long it works and is available it is much better than not existing, which was what you wanted. >> Since Zeev and Andi seem to be currently the most capable developers to >> bring multi-threading capability to PHP because they developed PHP current >> engine >> - Zend, my question still goes for them. After all they always seemed more >> reasonable and opened to my suggestions than you. >You are assuming they even read this mailing list. Yes, I can see that I posted a response to the wrong news group by mistake! :-) Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --
Hi! I've been blocked by this tiny problem... I have a main.php file: <? $frames = true; $open = "http://myserver.com/info.html"; if ($frames) { include ("frameset.php"); } ?> The frameset.php looks like (omitting almost all the HTML): <frameset rows="100,*" border="0"> <frame src="onlineview.php3"> <frame src="footer.html"> </frameset> In the onlineview.php file I need to use the $open URL defined before, but it isn't defined here. What am I doing wrong? How can I get $open's value from this file? Thanks! Jaime
Replace <frame src="onlineview.php3"> with <frame src=<? echo $open;?>> Variable $open is passed to the included file automatically. > Hi! > > I've been blocked by this tiny problem... > > I have a main.php file: > > <? > $frames = true; > $open = "http://myserver.com/info.html"; > if ($frames) > { > include ("frameset.php"); > } > ?> > > The frameset.php looks like (omitting almost all the HTML): > <frameset rows="100,*" border="0"> > <frame src="onlineview.php3"> > <frame src="footer.html"> > </frameset> > > In the onlineview.php file I need to use the $open URL defined before, but > it isn't defined here. What am I doing wrong? How can I get $open's value > from this file? > > Thanks! > > Jaime > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Thanks for your answer George. But I still have a problem. What if I need to get another variables values from the main.php file? Do I need to pass them with the URL? Something like: <frame src=<? echo $open."?another_var=".$another_val; ?>> The big question is including a file from an included file passes the values of the variables defined in the parent? Regads, Jaime -----Mensaje original----- De: George E. Papadakis [mailto:[EMAIL PROTECTED]] Enviado el: domingo 20 de mayo de 2001 13:22 Para: Jaime Torres; [PHP] General List Asunto: Re: [PHP] include() in a file incuded() Replace <frame src="onlineview.php3"> with <frame src=<? echo $open;?>> Variable $open is passed to the included file automatically. > Hi! > > I've been blocked by this tiny problem... > > I have a main.php file: > > <? > $frames = true; > $open = "http://myserver.com/info.html"; > if ($frames) > { > include ("frameset.php"); > } > ?> > > The frameset.php looks like (omitting almost all the HTML): > <frameset rows="100,*" border="0"> > <frame src="onlineview.php3"> > <frame src="footer.html"> > </frameset> > > In the onlineview.php file I need to use the $open URL defined before, but > it isn't defined here. What am I doing wrong? How can I get $open's value > from this file? > > Thanks! > > Jaime > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
When will PHP4.0.6 be released? I'm writing an image library for my site and could use things like ImageCopyMerge() and ImageCopyResampled(). -- -- Ryan "leadZERO" Sommers Raving Gaming President [EMAIL PROTECTED] ICQ: 1019590 AIM/MSN: leadZERO -= http://www.ravingaming.com =- /* All communications are confidential unless otherwise noted. * Please include the original messages in replies. */
"Ryan Sommers" <[EMAIL PROTECTED]> wrote: > When will PHP4.0.6 be released? I'm writing an image library for my site and > could use things like ImageCopyMerge() and ImageCopyResampled(). I think the developers are hoping to release it within a week (if everything goes smooth :) -- Henrik Hansen
I'm new to PHP but have found it easier to use than perl...however I'm in the midst of converting my whole site to php from perl and Ive run into a bit of a problem. Everything except one page is database driven, so I havent had to parse much text or grab info from other sites. I've got a movies page written in perl that does both, its very quick and dirty and shouldnt take long for someone a bit more experienced in php than I am to port over. Would anyone be interested in helping? Please reply directly. -Matt Broughton
You could always do a cron job and have a script run every 10-15 minutes, load the existing and connecting IP's in a text file and use another script to print out the latest successful pings. -C ""Brian"" <[EMAIL PROTECTED]> wrote in message 9e4msm$e5a$[EMAIL PROTECTED]">news:9e4msm$e5a$[EMAIL PROTECTED]... > Good point, I considered, doing it that way, I was just hoping that there > might be a 'prettier' way to do it from within PHP. Right now I'm using > fping from within a php loop that steps through the class C. The machine > I'm doing this on is dog slow though, so I'm hoping that when I move the > final version over to our main webserver it will run the script at an > acceptable speed. If not though, I have a feeling that I will most likely > implement your suggestion, unless someone knows of the 'pretty' solution > that I seek :) > > Brian > "He did not know the strength of my Kung fu" > --Wong Fei Hung "The Iron Monkey" > > "Mohamed LRHAZI" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Brian, > > > > Why don't leave the "pinging" to some other script, and have that other > > script run continuesouly and upfate a sql table with the ststus of each > > and time stamp of when it was last ping'ed...etc > > > > Mohamed~ > > > > Brian wrote: > > > > > > I'm writing a script to help us manage one of our Class C networks. The > > > page loads all of the host IPs, who owns them, phys desc. of the box, > and > > > does a forward reverse lookup on all of the addresses. I'd like to add > a > > > column that shows which machines are currently reachable on the network. > A > > > simple ping would probably be easiest, but parsing a standard ping for > 254 > > > hosts would cause the script to have about a 10 minute load time. are > there > > > any quick easy, and most importly, low system overhead, solutions to > this > > > problem? > > > > > > Brian Artiaco > > > [EMAIL PROTECTED] > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
On 18-May-01 Brian wrote: > Good point, I considered, doing it that way, I was just hoping that there > might be a 'prettier' way to do it from within PHP. Right now I'm using > fping from within a php loop that steps through the class C. The machine > I'm doing this on is dog slow though, so I'm hoping that when I move the > final version over to our main webserver it will run the script at an > acceptable speed. If not though, I have a feeling that I will most likely > implement your suggestion, unless someone knows of the 'pretty' solution > that I seek :) > The background script is the better way; but for a short-cut, at the top of the loop, ping your broadcast addr '192.168.x.255' a few times and then collect the DUP's. These won't have to get pinged explicitly. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.
I've been working with curl as well. It allows a pretty easy method to access https, however it is limited as far as encrypting data and sending to an https server. So now i'm experimenting with snoopy to simulate a web client. I'm trying to link up with UPS online tools, but the sob's only know java. I've posted to this news group with questions pertaining to this stuff, but nobody seems to understand what I'm talking about. There has to something out there, as I'm sure somebody has to have done this before. -dave ""Tolga "thorr" Orhon"" <[EMAIL PROTECTED]> wrote in message 9e3no5$hld$[EMAIL PROTECTED]">news:9e3no5$hld$[EMAIL PROTECTED]... > As far as I know you cant do that with standard socket connection as SSL > needs more than that. One solution that I am currently using is using Curl > extensions of PHP which is working just fine. But you may need to recompile > PHP with curl support. For more info: > > http://www.php.net/manual/en/ref.curl.php > http://curl.haxx.se/ > > Tolga 'thorr' Orhon > > "Todd Cary" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > For my http socket connection, I am using > > > > "POST $abs_url HTTP/1.0\r\n". > > "Accept-Language: en-us\r\n". > > "Host: $host:$port\r\n". > > "Connection: close\r\n". > > "Content-type: application/x-www-form-urlencoded\r\n". > > > > which works great. > > > > What do I need to change for a SSL connection? > > > > Todd > > > > -- > > Todd Cary > > Ariste Software > > [EMAIL PROTECTED] > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I can't seem to get unset() to work when I'm strying to delete an element from an array. I have a select list that is populated by an array, and i need to be able to delete items from the list by deleting them from the array, but I don't know how. I tried using unset($array['element']); but it doesn't work. Does anyone know why? Does anyone know of a way to use array_diff() to delete elements from an array? Thanks, Tom
Hello Diego, You need to use copy() If the form input is like this: file: <input name="userfile" type="file"> <input type="submit" Then PHP will assign a few variables automatically to the file, which include: $file_name - actual name of the file (pic.jpg) $file_size - size in bytes of the file $file_type - MIME type of the file. This: <input type="hidden" name="MAX_FILE_SIZE" value="1000">Send this Will only let you upload a file of less than 1kb if you program around that (1024 bytes in a Kb). Setting to 102400 would give you a max upload size of 100 Kb. So, simply: <? if ($file_size < $MAX_FILE_SIZE) { @copy($file, "/path/to/dir/" . $file_name) or die ("Something's up."); } else { echo "Sorry. Your file was bigger than the allowed size of " . round(($MAX_FILE_SIZE / 1024), 2) ."Kb. Please go back and try again."; } ?> You can of course test whether the file being uploaded is a type you want, like "image/jpeg" from the $file_type. Hope this helps. James. "Diego Pérez Rández" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi to all: > > I don`t konw very well php. I do examples everyday and solve some > problems. But in other i need help. > > Today i want to upload a file. I have the form that you can find in > the php manual. > > <form enctype="multipart/form-data" action="_URL_" method="POST"> > <input type="hidden" name="MAX_FILE_SIZE" value="1000">Send this > file: <input name="userfile" type="file"> <input type="submit" > value="Send File"> > </form> > > My problem is that i don´t know how to programe the php program that > upload the file. I do a lot of examples, but not work. > > Can someone give me help. > > > Thanks. > > > Best regards, Diego > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
What I look for is a POP/IMAP server that writes incoming mails to a MySQL db! (WIN32) Fredrik Takle Bergen, Norway ""Plutarck"" <[EMAIL PROTECTED]> skrev i melding 9e73vh$95f$[EMAIL PROTECTED]">news:9e73vh$95f$[EMAIL PROTECTED]... > Check out http://webgadgets.com/phpost/ > > That's a good way to get started on handling emails with PHP. > > I'd need to know more about what you want to do to tell you if PHP is the > way to do it. > > If you want to run a mail server which takes incoming emails and directly > writes them to a database, PHP probably isn't the way to go. A Java Servlet > would probably be a more appropriate application for that. > > But I don't think that's what you're wanting to do. > > > Plutarck > > ""FredrikAT"" <[EMAIL PROTECTED]> wrote in message > 9e6gud$eie$[EMAIL PROTECTED]">news:9e6gud$eie$[EMAIL PROTECTED]... > > Hi! > > > > I want to have a mailapp on my server (win32) wich writes all incoming > mails > > to a MySQL db. > > > > Is this possible? > > > > --------------------------------- > > Fredrik A. Takle > > [EMAIL PROTECTED] > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --------------------------------- Fredrik A. Takle [EMAIL PROTECTED]
Mark Wouters <[EMAIL PROTECTED]> wrote: > Hi, > > I've another question.. is it possible to send attachements with mail() it sure is, look at phpclasses.upperdesign.com for classes for the purpose (unde mail classes) -- Henrik Hansen
Can anyone tell me how this asp code would be rewritten in PHP, I'm having trouble getting it to work. Don't worry about the variable names and stuff, it's just the actual connection to the application that's causing me the grief. Thanks for any suggestions, Skipsey. begin 666 createservername.asp M/"5 ($QA;F=U86=E/59"4V-R:7!T("4^#0H-"CPA+2T@(VEN8VQU9&4@9FEL M93TB97)R;W(N87-P(B M+3X-"@T*/"4-"D]N($5R<F]R(%)E<W5M92!.97AT M#0I%<G(N0VQE87(@#0H-"DEF(%)E<75E<W0N1F]R;2@B<V5R=F5R7VYA;64B M*2 \/B B(B!4:&5N#0H)4V5T($-L:65N=%-E<G9I8V4@/2!#<F5A=&5/8FIE M8W0H(E1E>'1M;%-E<G9E<BY#;&EE;G1397)V:6-E<R(I#0H)268@17)R+FYU M;6)E<B ](# @5&AE;@T*"0E3970@4V5R=F5R4V5R=FEC92 ]($-L:65N=%-E M<G9I8V4N0V]N;F5C=%-E<G9E<BA#<W1R*%)E<75E<W0N1F]R;2@B<V5R=F5R M7VYA;64B*2DI#0H)"4EF($5R<BYN=6UB97(@/2 P(%1H96X-"@D)"5-E="!F M<V\@/2!#<F5A=&5/8FIE8W0H(E-C<FEP=&EN9RY&:6QE4WES=&5M3V)J96-T M(BD-"@D)"5-E="!T<R ](&9S;RY#<F5A=&5497AT1FEL92A397-S:6]N*")A M<'!0871H(BD@)B B<V5R=F5R;F%M92YT>'0B+"!4<G5E+"!&86QS92D-"@D) M"4EF($5R<BYN=6UB97(@/2 P(%1H96X-"@D)"0ET<RY7<FET94QI;F4@0U-T M<BA297%U97-T+D9O<FTH(G-E<G9E<E]N86UE(BDI#0H)"0D)=',N0VQO<V4- M"@D)"0E297-P;VYS92Y2961I<F5C=" B;&]G:6XN87-P(@T*"0D)16QS90T* M"0D)"5=R:71E17)R;W(@17)R+" B8W)E871E('1H92 \0CYS97)V97)N86UE M+G1X=#PO0CX@9FEL92(-"@D)"45N9"!)9@T*"0D)4V5T('1S(#T@3F]T:&EN M9PT*"0D)4V5T(&9S;R ]($YO=&AI;F<-"@D)16QS90T*"0D)5W)I=&5%<G)O M<B!%<G(L(")C;VYN96-T('1O('1H92!S97)V97(@/$(^(B F(%)E<75E<W0N M1F]R;2@B<V5R=F5R7VYA;64B*2 F("(\+T(^(@T*"0E%;F0@268-"@E%;'-E M#0H)"5=R:71E17)R;W(@17)R+" B8W)E871E('1H92!#;&EE;G0@4V5R=FEC M92(-"@E%;F0@268-"D5L<V4-"@E297-P;VYS92Y2961I<F5C=" B9&5F875L 2="YH=&TB#0I%;F0@268-"B4^ ` end
> phpinfo() allways has a list of variables. but of course every variable is > allways in $GLOBALS too. including constants? I just print_r'd globals to refresh my memory, and found what I was expecting: none of my constants. ? _alex
Can someone give me a template of an email form? I don't want it to use an email client, though. I don't get the mail function, and I've been out of the loop too long. :( -Owen
$address .= $email ;//insert a comma after $ email to include another address, email address taken from session varables // Subject $subject = " "; //Body of email $body = " "; //Where the email is from //$from = "sender"; $headers .= "From: \n"; $headers .= "X-Sender: \n"; $headers .= "X-Mailer: PHP\n"; // mailer $headers .= "Return-Path: \n"; // Return path for errors $headers .= "X-Priority: 1\n"; // Urgent message! /* If you want to send html mail, uncomment the following line */ //$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type $headers .= " \n"; // CC to //send the email $mail = mail("$address", "$subject", "$body", "$headers \nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit" ); Peter Houchin Short Term Rental Manager [EMAIL PROTECTED] Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 ========================================================= _____ __ /\ /_/_/_\ / |_/ \ /_/_/_ __ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/ v ________ ________________________________________ /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ ______ __ __ /_/ ____ __ ______ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/ ========================================================= -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, May 21, 2001 10:04 AM To: [EMAIL PROTECTED] Subject: [PHP] Email.. Can someone give me a template of an email form? I don't want it to use an email client, though. I don't get the mail function, and I've been out of the loop too long. :( -Owen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello All, I need to output a string that must always be 17 characters even if the inside value is not. Supose a have the HELLO word that is a 5 character string and I need to output "HELLO " which is 17 characters. How can I accomplish this in PHP4 ? Has anyone ever did it? Thanks, Carlos Fernando.