Re: [PHP] servers in php
.. You have never used PHP on win32, have you? -- // DvDmanDT MSN: dvdmandt?hotmail.com Mail: dvdmandt?telia.com Norbert Pfeiffer [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Hi Comex, forget Win-PHP, it only scarcely to 60% of the functions are supported. Everything which with Sockets, Pipes or the like to do has, became omitted. m. b. G. Norbert _ normal: 02686-987103 Notruf: 0177-2363368 - e.o.m. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: DOM XML and php
But of course you can. Check out the manual: http://ro.php.net/manual/en/function.domxml-open-mem.php and the code sample I've sent you in the thread, Regards, Lucian Tassos T [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I agree but I cannot find a way to transform xlm data from variable not open xml file with using DOMXML. tassos -Original Message- From: Lucian COZMA [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 1:50 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: DOM XML and php True, but it does much more than that. It also provides xslt transformations. It uses the powerfull libxslt library that provides far more features, speed and reliablility than Sablot. I would rather do XSL transformations with DOMXML than with Sablot just for these reasons. Thanks for your response. Lucian Tassos T [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Sory for delay I use sablotron because I take xml data via curl from windows server. I need only a way to transform xml data with xslt and I want to present data to web pages. I think DOMXML provide functions to create XML docs from the beginning and manipulate xml data like add or remove xml elements. I hope to help you. tassos -Original Message- From: Lucian COZMA [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 5:31 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: DOM XML and php I have a question please (I'm trying to clarify something for me): Why do you preffer Sablotron to DOMXML ? As I'm developping XML/XSLT framework applications, I'm trying to understand why would our clients use it instead of DOMXML and adapt to it if there is a good reason for it. I want to know this because DOMXML is faster and more reliable than Sablotron (my opinion after using extesively both of them), and both are extensions, that you have to install, not something native that comes directly embeded into PHP. Thanks, Lucian COZMA Tassos T [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks I use this code and it works. tassos -Original Message- From: Lucian COZMA [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 4:03 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: DOM XML and php It should look something like (pretty much extracted from manual): ?php // $xml and $xsl contain the XML and XSL data ($xsl = file_get_contents('myxsl.xsl') and $xml ='blabla1lalala/bla1/bla $arguments = array( '/_xml' = $xml, '/_xsl' = $xsl ); // Allocate a new XSLT processor $xh = xslt_create(); // Process the document $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); if ($result) { //SUCCESS, sample.xml was transformed by sample.xsl into the $result print $result; } else { print Sorry, sample.xml could not be transformed by sample.xsl into; print the \$result variable the reason is that . xslt_error($xh) . print and the error code is . xslt_errno($xh); } xslt_free($xh); ?Lucian COZMA Lucian Cozma [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you really want to use Sablotron (although I tried it I not liked it as much as DOMXML, gimme a sign, and I'll debug you. Regards, Lucian COZMA @ InterAKT Tassos T [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for your reply but I have another problem I have an xml string if I use this code ? header(Content-Type: text/xml); echo $xml_string; ? I can see the xml tree but I cannot transform with te xslt. Eg. ? $xp = xslt_create(); $result_xsl = xslt_process($xp, $xml_string, 'myxsl.xsl'); echo $result_xsl; xslt_free($xp); ? Please advise Regards tassos -Original Message- From: Lucian COZMA [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 3:20 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: DOM XML and php ?php $xmlstr = 'blabla1blabalabalab/bla1/bla'; if(!$dom = domxml_open_mem($xmlstr)) { echo Error while parsing the document\n; exit; } // The root domdocument node $root = $dom-document_element(); ///Dump the content back to string var_dump($dom-dump_mem()); ? Read the manual in the DOM XML functions section. Regards, Lucian COZMA Tassos T [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I face a problem. I have a php script and I send a xml request to a server. After I receive xml data but I have this data to an php string variable. How to create a xml dom with out to write a xml file ? I want to use a xslt to tranform that xml data. Any idea ? Thanks tassos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --
php-general Digest 15 Mar 2004 08:48:16 -0000 Issue 2647
php-general Digest 15 Mar 2004 08:48:16 - Issue 2647 Topics (messages 180396 through 180415): Re: Mail 180396 by: Jason Davidson 180397 by: Will User denided function 180398 by: nblanco XML architecture question 180399 by: Jabro 180402 by: Ray Hunter Re: Classes Objects. 180400 by: Marco Schuler Re: Web based php development tool 180401 by: Marco Schuler [Q] PHP code embedded in html files - What happens? 180403 by: Michael T. Peterson 180405 by: Jeffrey Lee 180407 by: EastLothianDirectory 180408 by: EastLothianDirectory 180409 by: Steve Edberg Re: Scripts creating files and folders into un/grp Nobody on Apache 180404 by: Jay Anyway to access a class variable without using a return function? 180406 by: Terence 180410 by: Tom Rogers Behind the scenes coding? 180411 by: Dustin Wish with INDCO Networks 180412 by: Jason Wong 180413 by: Ryan A 180414 by: Dustin Wish with INDCO Networks Re: servers in php 180415 by: DvDmanDT 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] -- ---BeginMessage--- Check the manual to be sure, but it appears that you have the arguments for the mail function in the wrong order . mail(to, subject, msg, headers) ... i beleive is the correct order. Jason Will [EMAIL PROTECTED] wrote: Hello All, I am having a problem with sending a reply from a form. It is giving me a 550 error: There is no valid sender in any header line. My form is: ? include (inc/setup.php); // Mail reply to Orginial poster $recipient .= [EMAIL PROTECTED], $_POST[email]\n; $mailheaders .= To: $_POST[email]\n; $mailheaders .= From: $_POST[email]\n; $subject .= $_POST[subject]; $msg .= Please do not reply to this email!!!\n\n; $msg .= Here is our answer: \r$_POST[message]\n\n; $msg .= Please use your username/password that was assigned to you.\n\n; mail($recipient, $mailheaders, $subject, $msg); $add_reply = INSERT into $table_name25 values ('', now(), '$_POST[subject]', '$_POST[name]', '$_POST[email]', '$_POST[message]'); mysql_query($add_reply,$conn) or die(mysql_error()); header(Location: support_archive.php); exit; ? And when I recieive the one email there are no from and reply to in the email client. Plus it is in the subject line!!! What the heck am I doing wrong??? Thanks in advance, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- Thank you very much!!! That was it ~WILL~ -Original Message- From: Jason Davidson [mailto:[EMAIL PROTECTED] Sent: Sunday, March 14, 2004 2:40 PM To: Will Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Mail Check the manual to be sure, but it appears that you have the arguments for the mail function in the wrong order . mail(to, subject, msg, headers) ... i beleive is the correct order. Jason Will [EMAIL PROTECTED] wrote: Hello All, I am having a problem with sending a reply from a form. It is giving me a 550 error: There is no valid sender in any header line. My form is: ? include (inc/setup.php); // Mail reply to Orginial poster $recipient .= [EMAIL PROTECTED], $_POST[email]\n; $mailheaders .= To: $_POST[email]\n; $mailheaders .= From: $_POST[email]\n; $subject .= $_POST[subject]; $msg .= Please do not reply to this email!!!\n\n; $msg .= Here is our answer: \r$_POST[message]\n\n; $msg .= Please use your username/password that was assigned to you.\n\n; mail($recipient, $mailheaders, $subject, $msg); $add_reply = INSERT into $table_name25 values ('', now(), '$_POST[subject]', '$_POST[name]', '$_POST[email]', '$_POST[message]'); mysql_query($add_reply,$conn) or die(mysql_error()); header(Location: support_archive.php); exit; ? And when I recieive the one email there are no from and reply to in the email client. Plus it is in the subject line!!! What the heck am I doing wrong??? Thanks in advance, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- Hi, Is it posible to use a user funcion in a Select statement? I need to return from a Database the sum of the less two of three columns. For example, if the data were 67, 86,53 I must return, in a single field, the sum of 53+67. I'm using OBDC over a MS Access Database in PHP. Thanks in advance, Nacor---End Message--- ---BeginMessage--- Hi List, hope somebody here can help me out here.
[PHP] concatenating 2 resultsets
Hi all, is it possible to concatenate two resultsets, to form a big resultset. both resultsets will return the same columns. eg query 1 returns NAME| ADDRESS| EMAIL query 2 returns NAME| ADDRESS| EMAIL but they have different data however the column count is the same (in fact they are the same column) thanx in advance Angelo Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Technikon or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] concatenating 2 resultsets
Angelo Zanetti wrote: Hi all, is it possible to concatenate two resultsets, to form a big resultset. What database are you using? both resultsets will return the same columns. eg query 1 returns NAME| ADDRESS| EMAIL query 2 returns NAME| ADDRESS| EMAIL but they have different data however the column count is the same (in fact they are the same column) Look at UNION syntax -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] building a statically linked php cli
Am Freitag, 12. März 2004 16:58 schrieb Hugh Beaumont: Hi List, What I want is a binary that has all the libs built into it (I realize this will result in a larger binary and memory footprint). Any advice? try make LDFLAGS=-all-static -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] concatenating 2 resultsets [SOLVED]
solved guys -Original Message- From: Angelo Zanetti [mailto:[EMAIL PROTECTED] Sent: Monday, March 15, 2004 12:30 PM To: [EMAIL PROTECTED] Subject: [PHP] concatenating 2 resultsets Hi all, is it possible to concatenate two resultsets, to form a big resultset. both resultsets will return the same columns. eg query 1 returns NAME| ADDRESS| EMAIL query 2 returns NAME| ADDRESS| EMAIL but they have different data however the column count is the same (in fact they are the same column) thanx in advance Angelo Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Technikon or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Technikon or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with storing multiple values in session variables.
Hi, I have php configured to use sessions. I have a web-database application and have the following problem with sessions I fetch values from database and these values get passed across forms either with POST for submit opion OR GET with href. Now i have problem passing unicode strings with href and GET. Embedding unicode values with get does not work out. I cannot use POST method here since i navigate with href. So i tried assiging the value to a SESSION variable. For the first time the application works, but if i refresh and try with a different href link, always the first assigned value only gets passed? What do i do to change the value of session variable in the same session? I cannot use global variables since, i have register globals off? Is there any way of passing unicode strings properly with href and get? I'm almost in completion where this problem croped? Any idea how to solve. -vimala/. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP ftp web client
Hello! Can someone recommend me a good/stable PHP-FTP Web client? I wasnt quite happy with the google search results :P Thanks a lot! Mario -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] use of @ operator to suppress errors
hi. i'm using error_reporting(0) and set_error_handler(MyErrorHandler) to manage my errors but I'm getting situations where a NOTICE error is thrown. For example if I refer to $_GET['this'] when there is no 'this' querystring key then i get the error. I've tried using @$_GET['this'] but it makes no difference. Is this normal? Thanks in advance. Ben p.s. PHP 4.3.4 on Windows 2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] virtual() include path problems
I've been trying to use virtual to include a .shtml file that is outside of my current directory (one level up). I've tried the following: a) virtual(../header.shtml); b) virtual($_SERVER['DOCUMENT_ROOT'] . /header.shtml); c) virtual(/usr/local/psa/home/vhosts/miningstocks.com/httpdocs/header.shtml/); b c should be equivalent, because $_SERVER['DOCUMENT_ROOT'] should be the same as /usr/local/psa/home/vhosts/miningstocks.com/httpdocs. With that in mind, both bc do not work at all. But a does work. Is virtual not supposed to use absolute paths? The documentation on php.net doesn't say either way, but for the include() fuction it says that it should work... Best Regards, Scott Taylor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] use of @ operator to suppress errors
Hello Ben, Monday, March 15, 2004, 11:43:24 AM, you wrote: BJ For example if I refer to $_GET['this'] when there is no 'this' querystring BJ key then i get the error. BJ I've tried using @$_GET['this'] but it makes no difference. BJ Is this normal? Yes because @ suppresses the errors on function calls, not variables (which is all $_GET['this'] is). It's like saying @$this - i.e. as you can see, it doesn't make sense. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with storing multiple values in session variables.
Hello Vimala, Monday, March 15, 2004, 11:55:47 AM, you wrote: VSP Is there any way of passing unicode strings properly with href and get? I'm 99% sure you can pass unicode strings by simply URL Encoding them (see urlencode) before appending to the query string. Try it and see? -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP ftp web client
Hello Mario, Monday, March 15, 2004, 11:40:45 AM, you wrote: MO Can someone recommend me a good/stable PHP-FTP Web client? MO I wasnt quite happy with the google search results :P Search hotscripts.com or Freshmeat.net -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] use of @ operator to suppress errors
Yes, it's normal. You've to check if is that variable set if (isset($_GET['this'])) and than you didn't get any NOTICE about that undefined variable. condition if ($_GET['this']) is not sufficient to check whether is variable set or not. /tom On Mon, 15 Mar 2004 11:43:24 - Ben Joyce [EMAIL PROTECTED] wrote: hi. i'm using error_reporting(0) and set_error_handler(MyErrorHandler) to manage my errors but I'm getting situations where a NOTICE error is thrown. For example if I refer to $_GET['this'] when there is no 'this' querystring key then i get the error. I've tried using @$_GET['this'] but it makes no difference. Is this normal? Thanks in advance. Ben p.s. PHP 4.3.4 on Windows 2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Anyway to access a class variable without using a return function?
I think you could also do something like this: class MyClass { function MyClass { $this-var1=1; $this-var2=2; } function GetVar($var) { return $this-{$var}; } } $test = new MyClass(); echo $test-GetVar('var1').'br /'; echo $test-GetVar('var2').'br /'; -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED] Sent: 15 March 2004 02:57 To: Terence Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Anyway to access a class variable without using a return function? Hi, Monday, March 8, 2004, 3:42:30 PM, you wrote: T Hi List, T I have a class with a constructor that sets the variables and I T currently use functions to return each one. When using alot of T variables in the constructor i tend to have many return functions. Is T there a way to access the constructor variables without using a return function? T This is how I do it: T class MyClass { T function MyClass { T $this-var1=1; T $this-var2=2; T } T function GetVar1() { T return $this-var1; T } T function GetVar2() { T return $this-var2; T } T } T Thanks Should be something like this: class MyClass { var $var1; vat $var2; function MyClass { $this-var1=1; $this-var2=2; } function GetVar1() { return $this-var1; } function GetVar2() { return $this-var2; } } $test = new MyClass(); echo $test-var1.'br'; echo $test-var2.'br'; This is not recommended by OOP buffs but it is perfectly legal. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] use of @ operator to suppress errors
Ben Joyce wrote: i'm using error_reporting(0) and set_error_handler(MyErrorHandler) to manage my errors but I'm getting situations where a NOTICE error is thrown. For example if I refer to $_GET['this'] when there is no 'this' querystring key then i get the error. I've tried using @$_GET['this'] but it makes no difference. Is this normal? Yes it is. When you use set_error_handler all errors, warnings and notices cause your handler to be called. To detect the use of the @ prefix check the value of error_reporting in your handler - it will be 0 if @ has been used. Richard Davey wrote: Yes because @ suppresses the errors on function calls, not variables (which is all $_GET['this'] is). On the contrary, the @ prefix suppresses all errors for the block of code it precedes where a block is a function or variable. Essentially it sets error_reporting to 0 while it evaluates that block. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] use of @ operator to suppress errors
Richard, Tom, and Stuart... thanks for your responses much appreciated. I shall now go and fiddle. Cheers, Ben - Original Message - From: Tom Meinlschmidt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 15, 2004 12:01 PM Subject: Re: [PHP] use of @ operator to suppress errors Yes, it's normal. You've to check if is that variable set if (isset($_GET['this'])) and than you didn't get any NOTICE about that undefined variable. condition if ($_GET['this']) is not sufficient to check whether is variable set or not. /tom On Mon, 15 Mar 2004 11:43:24 - Ben Joyce [EMAIL PROTECTED] wrote: hi. i'm using error_reporting(0) and set_error_handler(MyErrorHandler) to manage my errors but I'm getting situations where a NOTICE error is thrown. For example if I refer to $_GET['this'] when there is no 'this' querystring key then i get the error. I've tried using @$_GET['this'] but it makes no difference. Is this normal? Thanks in advance. Ben p.s. PHP 4.3.4 on Windows 2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC, PHP and Pervasive
G'day! I am trying to access data in a Pervasive database which is of quite an old version, not sure which, but using the Pervasive Software ODBC-32 driver, version 2.04.02.10, which comes with the application I am trying to share data with, Pastel Partner 5. I am running PHP 4.3 on Windows 2000 Professional with all the latest patches - Windows, that is. I have created two DSN's, one for Pervasive, and one for MS Access. I can connect to MS Access from my PHP script, add, manipulate and delete data, etc, and I ncan connect to Pervasive from Access using the DSN I created form that purpose, and add, delete, update data and so on. However, when I attempt to connect to Pervasive from my PHP script using the same DSN, no joy. All I get is Warning: SQL error: [Pervasive Software][ODBC Interface][Pervasive Software SQL Engine]General error., SQL state S1000 in SQLConnect in c:\inetpub\wwwroot\nettsis\includes\import\pastelodbc.php on line 9. I have set logging on in the ODBC thingie, but it is meaningless to me: php 714-5d8 ENTER SQLAllocEnv HENV * 00B06EF8 php 714-5d8 EXIT SQLAllocEnv with return code 0 (SQL_SUCCESS) HENV * 0x00B06EF8 ( 0x009414f0) php 714-5d8 ENTER SQLAllocConnect HENV009414F0 HDBC * 00B06EFC php 714-5d8 EXIT SQLAllocConnect with return code 0 (SQL_SUCCESS) HENV009414F0 HDBC * 0x00B06EFC ( 0x00941598) php 714-5d8 ENTER SQLConnectW HDBC00941598 WCHAR * 0x009416A0 [ -3] GruffTrading\ 0 SWORD -3 WCHAR * 0x1F7C4AA0 [ -3] **\ 0 SWORD -3 WCHAR * 0x1F7C4AA0 [ -3] **\ 0 SWORD -3 php 714-5d8 EXIT SQLConnectW with return code -1 (SQL_ERROR) HDBC00941598 WCHAR * 0x009416A0 [ -3] GruffTrading\ 0 SWORD -3 WCHAR * 0x1F7C4AA0 [ -3] **\ 0 SWORD -3 WCHAR * 0x1F7C4AA0 [ -3] **\ 0 SWORD -3 DIAG [S1000] [Pervasive Software][ODBC Interface][Pervasive Software SQL Engine]General error. (802) php 714-5d8 ENTER SQLErrorW HENV009414F0 HDBC00941598 HSTMT WCHAR * 0x0012F328 (NYI) SDWORD *0x0012F370 WCHAR * 0x0012EF28 SWORD 511 SWORD * 0x0012F36E php 714-5d8 EXIT SQLErrorW with return code 0 (SQL_SUCCESS) HENV009414F0 HDBC00941598 HSTMT WCHAR * 0x0012F328 (NYI) SDWORD *0x0012F370 (802) WCHAR * 0x0012EF28 [ 81] [Pervasive Software][ODBC Interface][Per SWORD 511 SWORD * 0x0012F36E (81) php 714-5d8 ENTER SQLFreeConnect HDBC00941598 php 714-5d8 EXIT SQLFreeConnect with return code 0 (SQL_SUCCESS) HDBC00941598 The relevant part of my PHP Code is as follows: $dsn = GruffTrading; // Datasource $dsu = ; // User $dsp = ; // Password if(!$odbclink = odbc_connect($dsn,$dsu,$dsp)) die(Unable to connect to Data Source $dsnbr.odbc_error().: .odbc_errormsg()); odbc_pconnect behaves the same. Any ideas, anyone? Cheers, William. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Anyway to access a class variable without using a return function?
Hi! Am Mo, 2004-03-15 um 13.02 schrieb Dave Starling: I think you could also do something like this: class MyClass { function MyClass { $this-var1=1; $this-var2=2; } function GetVar($var) { return $this-{$var}; } } $test = new MyClass(); echo $test-GetVar('var1').'br /'; echo $test-GetVar('var2').'br /'; Better check first if property/var exists: function getVar($var) { $that = null; if (isset($this-$var)) { $that = $this-$var; } return $that; } -- Regards Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] use of @ operator to suppress errors
Hmm. I'm confused. This page... http://uk.php.net/manual/en/language.operators.errorcontrol.php ...says that you can prepend the @ operator to a variable. So with @$_GET['this'] it should suppress the NOTICE error if 'this' doesn't exist. I've done some testing: Test #1 error_reporting(E_ALL); echo $_GET['test']; This generates an on-screen error. Test #2 error_reporting(E_ALL); echo @$_GET['test']; The error is suppressed. If I elect to use a custom error handler then i always get an error generated. It makes no difference what the error level is or whether I use the @ operator. set_error_handler(CustomErrorHandler); error_reporting(E_ALL); echo @$_GET['test']; set_error_handler(CustomErrorHandler); error_reporting(0); echo @$_GET['test']; set_error_handler(CustomErrorHandler); error_reporting(E_ALL); echo $_GET['test']; set_error_handler(CustomErrorHandler); error_reporting(0); echo $_GET['test']; They all have the same result. I suppose I could handle this in my error handling function, ignoring any NOTICE errors, but ideally I'd like to leave it as-is and suppress them when referencing. I'm not sure if I'm making much sense. Any help appreciated! Cheers, Ben - Original Message - From: Stuart [EMAIL PROTECTED] To: Ben Joyce [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 15, 2004 12:11 PM Subject: Re: [PHP] use of @ operator to suppress errors Ben Joyce wrote: i'm using error_reporting(0) and set_error_handler(MyErrorHandler) to manage my errors but I'm getting situations where a NOTICE error is thrown. For example if I refer to $_GET['this'] when there is no 'this' querystring key then i get the error. I've tried using @$_GET['this'] but it makes no difference. Is this normal? Yes it is. When you use set_error_handler all errors, warnings and notices cause your handler to be called. To detect the use of the @ prefix check the value of error_reporting in your handler - it will be 0 if @ has been used. Richard Davey wrote: Yes because @ suppresses the errors on function calls, not variables (which is all $_GET['this'] is). On the contrary, the @ prefix suppresses all errors for the block of code it precedes where a block is a function or variable. Essentially it sets error_reporting to 0 while it evaluates that block. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyway to access a class variable without using a return function?
I mean using get_object_vars() is much better. and in the example I've seen there: you HAVE TO define all the variables you're using in a class scope. eg class myClass { var $var1; var $var2 = array(); function myClass($var) { $vars =get_object_vars($this); if (isset($vars[$var])) return $vars[$var]; return false; } } /tom On Mon, 15 Mar 2004 13:36:07 +0100 Marco Schuler [EMAIL PROTECTED] wrote: Hi! Am Mo, 2004-03-15 um 13.02 schrieb Dave Starling: I think you could also do something like this: class MyClass { function MyClass { $this-var1=1; $this-var2=2; } function GetVar($var) { return $this-{$var}; } } $test = new MyClass(); echo $test-GetVar('var1').'br /'; echo $test-GetVar('var2').'br /'; Better check first if property/var exists: function getVar($var) { $that = null; if (isset($this-$var)) { $that = $this-$var; } return $that; } -- Regards Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] use of @ operator to suppress errors
Many Thanks Nikolay. It seems then that if I'm to avoid the NOTICE errors then isset() should be used as suggested earlier. Not the greatest solution but a working one. Thanks to all. Ben - Original Message - From: Nikolay Bachiyski [EMAIL PROTECTED] To: Ben Joyce [EMAIL PROTECTED] Sent: Monday, March 15, 2004 2:32 PM Subject: Re: [PHP] use of @ operator to suppress errors - Original Message - From: Ben Joyce [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 15, 2004 2:04 PM Subject: Re: [PHP] use of @ operator to suppress errors Hmm. I'm confused. This page... http://uk.php.net/manual/en/language.operators.errorcontrol.php ...says that you can prepend the @ operator to a variable. So with @$_GET['this'] it should suppress the NOTICE error if 'this' doesn't exist. I've done some testing: Test #1 error_reporting(E_ALL); echo $_GET['test']; This generates an on-screen error. Test #2 error_reporting(E_ALL); echo @$_GET['test']; The error is suppressed. If I elect to use a custom error handler then i always get an error generated. It makes no difference what the error level is or whether I use the @ operator. set_error_handler(CustomErrorHandler); error_reporting(E_ALL); echo @$_GET['test']; set_error_handler(CustomErrorHandler); error_reporting(0); echo @$_GET['test']; set_error_handler(CustomErrorHandler); error_reporting(E_ALL); echo $_GET['test']; set_error_handler(CustomErrorHandler); error_reporting(0); echo $_GET['test']; They all have the same result. I suppose I could handle this in my error handling function, ignoring any NOTICE errors, but ideally I'd like to leave it as-is and suppress them when referencing. I'm not sure if I'm making much sense. Any help appreciated! Cheers, Ben - Original Message - From: Stuart [EMAIL PROTECTED] To: Ben Joyce [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 15, 2004 12:11 PM Subject: Re: [PHP] use of @ operator to suppress errors Ben Joyce wrote: i'm using error_reporting(0) and set_error_handler(MyErrorHandler) to manage my errors but I'm getting situations where a NOTICE error is thrown. For example if I refer to $_GET['this'] when there is no 'this' querystring key then i get the error. I've tried using @$_GET['this'] but it makes no difference. Is this normal? Yes it is. When you use set_error_handler all errors, warnings and notices cause your handler to be called. To detect the use of the @ prefix check the value of error_reporting in your handler - it will be 0 if @ has been used. Richard Davey wrote: Yes because @ suppresses the errors on function calls, not variables (which is all $_GET['this'] is). On the contrary, the @ prefix suppresses all errors for the block of code it precedes where a block is a function or variable. Essentially it sets error_reporting to 0 while it evaluates that block. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php When you are using set_error_handler, the standart PHP error handler is completely bypassed. Both the error_reporting value (saved in php.ini and set by the error_reporting() function) and the @ operator will have no effect onto your handler. Actually the @ error-control operator just sets error_reporting to 0 while the expression to which it is prepeneded is interpreted. Of course you still could fit your handler to use the error_reporting value and take the appropriate action. Regards, Nikolay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] catching URL#target params
Hi, all -- I know that I can easily see http://URL?param=value and even http://URL?value but I haven't found any way to capture http://URL#target as one would use to jump to a certain location in a plain HTML file. When I try this in a PHP file and run phpinfo, I see nothing that includes that target. Is there a var that will work for me? TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] catching URL#target params
Hi, it could be done only by parsing $_SERVER['QUERY_STRING'] variable ... eg $querystring = $_SERVER['QUERY_STRING']; eregi(#([a-z0-9_.-]*), $querystring, $arg); $hashtarget = $arg[1]; /tom On Mon, 15 Mar 2004 08:52:43 -0500 David T-G [EMAIL PROTECTED] wrote: Hi, all -- I know that I can easily see http://URL?param=value and even http://URL?value but I haven't found any way to capture http://URL#target as one would use to jump to a certain location in a plain HTML file. When I try this in a PHP file and run phpinfo, I see nothing that includes that target. Is there a var that will work for me? TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching URL#target params
but I haven't found any way to capture http://URL#target as one would use to jump to a certain location in a plain HTML file. When I try this in a PHP file and run phpinfo, I see nothing that includes that target. Is there a var that will work for me? usually this part of the URL is handled by the browser and I have not find a way to get at this with PHP. maybe via a javascript detour? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching URL#target params
Tom, et al -- ...and then Tom Meinlschmidt said... % % Hi, Hi! % % it could be done only by parsing $_SERVER['QUERY_STRING'] variable ... Well, that's what I thought of first, but I got nothing. To wit: bash-2.05a$ lynx -dump wftst.web-folio.net/help.php#foo | egrep -i 'foo|query' QUERY_STRING no value QUERY_STRING no value _SERVER[QUERY_STRING] no value _ENV[QUERY_STRING] no value Any other ideas? TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] catching URL#target params
BACK BACK BACK. I'm a stupid fool ... #something is NOT send to the server, so it's unable to track it ... sorry /tom request was a.php?aasdf=1234a#greetz and from apache log someip - - [15/Mar/2004:15:01:37 +0100] GET /~znouza/a.php?aasdf=1234a HTTP/1.1 200 3325 On Mon, 15 Mar 2004 15:00:04 +0100 Tom Meinlschmidt [EMAIL PROTECTED] wrote: Hi, it could be done only by parsing $_SERVER['QUERY_STRING'] variable ... eg $querystring = $_SERVER['QUERY_STRING']; eregi(#([a-z0-9_.-]*), $querystring, $arg); $hashtarget = $arg[1]; /tom On Mon, 15 Mar 2004 08:52:43 -0500 David T-G [EMAIL PROTECTED] wrote: Hi, all -- I know that I can easily see http://URL?param=value and even http://URL?value but I haven't found any way to capture http://URL#target as one would use to jump to a certain location in a plain HTML file. When I try this in a PHP file and run phpinfo, I see nothing that includes that target. Is there a var that will work for me? TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching URL#target params
At 15:00 15-3-04, Tom wrote: it could be done only by parsing $_SERVER['QUERY_STRING'] variable ... nay, the hash value is not there -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching URL#target params
Chris, et al -- ...and then Chris Hayes said... % % but I haven't found any way to capture % % http://URL#target ... % Is there a var that will work for me? % % usually this part of the URL is handled by the browser and I have not find % a way to get at this with PHP. Ahhh... Bummer! % maybe via a javascript detour? Can't do that since I'm trying to write code that can handle the old style call from some page that hasn't been updated, which means that I don't control it. All of my pages that point to help, of course, will have been fixed already :-/ Thanks HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] catching URL#target params
Tom, et al -- ...and then Tom Meinlschmidt said... % % BACK BACK BACK. I'm a stupid fool ... No you aren't, or that means I'm one for thinking the same thing. Hmmm... That doesnt' lend a lot of weight to your side :-) % % #something is NOT send to the server, so it's unable to track it ... Really? You mean it stays with the browser entirely? Wow. % % sorry Yeah; thanks anyway! % % /tom % % request was a.php?aasdf=1234a#greetz % and from apache log % someip - - [15/Mar/2004:15:01:37 +0100] GET /~znouza/a.php?aasdf=1234a HTTP/1.1 200 3325 Hully gee; it sure looks like you're right. Well, anyone with old calls will just be screwed, then. On with work... Thanks again HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] Anyway to access a class variable without using a return function?
Hi Am Mo, 2004-03-15 um 14.10 schrieb Tom Meinlschmidt: I mean using get_object_vars() is much better. and in the example I've seen there: you HAVE TO define all the variables you're using in a class scope. eg class myClass { var $var1; var $var2 = array(); function myClass($var) { $vars =get_object_vars($this); if (isset($vars[$var])) return $vars[$var]; return false; } } Somewhat more elegant, yes. But: your function above is called myClass which is the classname and therefore this function is a _constructor_! As a constructor does not allow to return values, the above example would only work if you rename the function-name to something other than myClass! -- Regards Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching URL#target params
is possible to catch it by javascript, but I have no clue how to use with normal hrefs (not forms) try script alert(document.location); /script and you'll get entrire request with #target part too. /tom -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyway to access a class variable without using a return function?
thank, sure. function name should be myClassGetVar() :) /tom On Mon, 15 Mar 2004 14:49:55 +0100 Marco Schuler [EMAIL PROTECTED] wrote: Hi Am Mo, 2004-03-15 um 14.10 schrieb Tom Meinlschmidt: I mean using get_object_vars() is much better. and in the example I've seen there: you HAVE TO define all the variables you're using in a class scope. eg class myClass { var $var1; var $var2 = array(); function myClass($var) { $vars =get_object_vars($this); if (isset($vars[$var])) return $vars[$var]; return false; } } Somewhat more elegant, yes. But: your function above is called myClass which is the classname and therefore this function is a _constructor_! As a constructor does not allow to return values, the above example would only work if you rename the function-name to something other than myClass! -- Regards Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] catching URL#target params
David, The only thing I can think of is using Javascript to set a cookie with the variable from window.location.href and then using PHP to pick up the value. Rather crude but it might work. Will -Original Message- From: David T-G [mailto:[EMAIL PROTECTED] Sent: 15 March 2004 14:08 To: PHP General list Cc: Tom Meinlschmidt Subject: Re: [PHP] catching URL#target params Tom, et al -- ...and then Tom Meinlschmidt said... % % BACK BACK BACK. I'm a stupid fool ... No you aren't, or that means I'm one for thinking the same thing. Hmmm... That doesnt' lend a lot of weight to your side :-) % % #something is NOT send to the server, so it's unable to track it ... Really? You mean it stays with the browser entirely? Wow. % % sorry Yeah; thanks anyway! % % /tom % % request was a.php?aasdf=1234a#greetz % and from apache log % someip - - [15/Mar/2004:15:01:37 +0100] GET /~znouza/a.php?aasdf=1234a HTTP/1.1 200 3325 Hully gee; it sure looks like you're right. Well, anyone with old calls will just be screwed, then. On with work... Thanks again HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I have a problem In Mail Function
Hi In a web application I need to send mail for each members whith a different content . mail message must be in HTML Format and 1256 code page I call mail() functoin in a simple loop to send multiple mail message with differrent content. now I want know that is any body know better method to do it ?? but I have bigest problem when I send message to yahoo mail server ,yahoo rout my message to bulk mail and I cant solve this problem please tell me if you have know solution. my send mail is come below: function send_mail($to,$subject,$message){ $headers = MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=windows-1256\r\n; $headers .= From: Me [EMAIL PROTECTED]\r\n; $headers .= Return-path: Me [EMAIL PROTECTED]\r\n; $headers .= Reply-To: Me [EMAIL PROTECTED]\r\n; // $headers .= Bcc: $to \r\n; if (mail($to, $subject, $message, $headers)) print($to Send Ok!br); else print(b$to Send Problem/b!br); } thanks
[PHP] Printing landscape
Is there a function/parameter that tells the printer to print in landscape? I believe I've searched through the Printer Functions and haven't encountered such a thing. Any help is appreciated. L -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with mkdir() under windows.
I'm having a problem using the mkdir() function under windows when the directory containts a special character. For instance, the directory Someone's Files, a forward slash is added before the 's and the directory returns an error. Is there a way around this? Thank you Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] List of all defined constants
Hi How can I get a list of all constants defined with define()? -- Grüsse Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] stripping content and parsing returned pages?
I have been looking everywhere for any tips or tutorials on, posting to separate websites and parsing the return values for input into a mysql db. I understand the parsing or stripping of html content from a page, but not how to post to a form on a different site and once the values are returned parse and redirect. I have read alittle about using CURL to perform some of this, but no real help there. I need to post to a login script, then once the page is processed, I will parsed the returned page for the data after logined. any help please? In expanding the field of knowledge, we but increase the horizon of ignorance. Henry Miller (1891-1980); US author. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004
[PHP] categorizing and array mapping
Hi, all -- So I have this help script which will have a whopping bunch of help entries in it and I'm thinking about categorizing. Of course, I could just leave everything in one big array and then use the targets, which will become the array keys, directly. But I think I'd like to categorize the tips, which means that I'll have to find a given help topic (eg addpix or resize) not just in a big array but in one of many category arrays (General, Upload, Manipulate, and so on). So I need to know 'x' for $help_x[$tip] so that I can display the contents. I'm gonig to have to traverse all arrays anyway, because I'm going to have a list of categories and tips down the left side, so building some sort of index probably wouldn't cost me too much. I could do something like // setup $req = some_parse_query_string_function() ; // index column down left side foreach ( array_values($categories) as $v ) { print span class='cat'$v/spanbr\n ; foreach ( array_keys($categories[$v]) as $k ) { $index[$k] = $v ; # index each tip's category print a href='$URL?req=$req' class='tip'$req/a ; } } // tip window on right side print span class='show'$categories[$index[$req]][$req]/span ; but I wonder if such an index is a good way to go and how that mess on the last line will really work out. I had hoped to do this conversion from a big file much like html head /head body pre a name='tipname' Text text text a name='another' More text ... /pre /body /html to something with a nicer presentation in a quick swoop, which means not going to a database yet (where I could, with a bit of planning, have a table of categories and tips and easily make my links with the power of the DB), but if this method will be just as painful as jumping to that then perhaps I should bite the bullet and do it now. Or maybe this ver doesn't get categories, just like the current sprawl of HTML doesn't have that blessing, either :-) Recommendations? Ideas? Caveats? TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] Anyway to access a class variable without using a return function?
Am Mo, 2004-03-15 um 15.21 schrieb Tom Meinlschmidt: thank, sure. function name should be myClassGetVar() :) NoP! -- Regards Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching URL#target params
I think that the only way to catch it is to rewrite the URL. 1)Write pages with appropriates links. Somethink like href='www.yoursite.com/anchor_target/index.php' 2)Create e rewrite rule in the htacces file. 3)Catch the target value from the php page parsing the rewritten URL www.yoursite.com/index.phpanchor=target I did it and it works. Sebastiano -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printing landscape
Lou -- ...and then Lou Apolonia said... % % Is there a function/parameter that tells the printer to print in % landscape? I believe I've searched through the Printer Functions and % haven't encountered such a thing. In general, no. Since PHP runs on the server, it has nothing to do with your browser or printer or parllel port or phase of the moon. You might be able to embed printer commands to switch to landscape as part of your output stream, but it would depend on the printer and not be very portable. You could probably find some javascript to tell the browser to tell the printer to use landscape, but I not only wouldn't sully myself by going there :-) but don't have the slightest idea where to look anyway. There's always educating/training the user, but that can be the hardest task of all! ;-) % % Any help is appreciated. Good luck! HTH HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] I have a problem In Mail Function
this is the safest method, according to me at least. second thing is: yahoo will tackle it as a spam if it has many recepients in to or cc or bcc Hope it helps Nitin - Original Message - From: Ali Ashrafzadeh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 15, 2004 7:07 PM Subject: [PHP] I have a problem In Mail Function Hi In a web application I need to send mail for each members whith a different content . mail message must be in HTML Format and 1256 code page I call mail() functoin in a simple loop to send multiple mail message with differrent content. now I want know that is any body know better method to do it ?? but I have bigest problem when I send message to yahoo mail server ,yahoo rout my message to bulk mail and I cant solve this problem please tell me if you have know solution. my send mail is come below: function send_mail($to,$subject,$message){ $headers = MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=windows-1256\r\n; $headers .= From: Me [EMAIL PROTECTED]\r\n; $headers .= Return-path: Me [EMAIL PROTECTED]\r\n; $headers .= Reply-To: Me [EMAIL PROTECTED]\r\n; // $headers .= Bcc: $to \r\n; if (mail($to, $subject, $message, $headers)) print($to Send Ok!br); else print(b$to Send Problem/b!br); } thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List of all defined constants
On Mar 15, 2004, at 3:23 PM, Marco Schuler wrote: Hi How can I get a list of all constants defined with define()? Marco, Like the manual (http://nl2.php.net/constants) says: Use get_defined_constants() to get a list of all defined constants. Regards, Filip de Waard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching URL#target params
Sebastiano, et al -- ...and then Seba said... % % I think that the only way to catch it is to rewrite the URL. % % 1)Write pages with appropriates links. Somethink like % href='www.yoursite.com/anchor_target/index.php' Hmmm... Do you mean that I should write the calling page this way? I can't do that; I'm planning for pages that I don't own that may not be updated (or even formed properly from the start). Or do you mean I create a subdir and index.php file for every possible link target? Ugh; there are way too many of those. Given a URL like http://web-folio.net/help.php#delcoll that should look like http://web-folio.net/help.php?req=delcoll for the new script, what do I put where in my site dir? % % 2)Create e rewrite rule in the htacces file. OK. % % % 3)Catch the target value from the php page parsing the rewritten URL % www.yoursite.com/index.phpanchor=target That sounds good, I think. % % I did it and it works. Great! Now tell me more :-) % % % Sebastiano Thanks HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] stripping content and parsing returned pages?
Hello Dustin, Monday, March 15, 2004, 2:45:06 PM, you wrote: DW I need to post to a login script, then once the page is processed, I will DW parsed the returned page for the data after logined. any help please? One word for you: snoopy Oh and one URL too: http://snoopy.sourceforge.com It will do EXACTLY what you need. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with storing multiple values in session variables.
Vimala -- ...and then Vimala S.P. said... % % Hi, Hi! % ... % Is there any way of passing unicode strings properly with href and get? If Richard's suggestion of urlencode doesn't work (though I expect it to), you could also try base64_encode() to form your HREFs and then base64_decode what you get in the script. I use it frequently. HTH HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] List of all defined constants
Hi Am Mo, 2004-03-15 um 15.52 schrieb Filip de Waard: On Mar 15, 2004, at 3:23 PM, Marco Schuler wrote: Hi How can I get a list of all constants defined with define()? Marco, Like the manual (http://nl2.php.net/constants) says: Use get_defined_constants() to get a list of all defined constants. Sorry, seems like I got tomatoes on my eyes today! Thanks! -- Regards Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with mkdir() under windows.
Hello Brian, Monday, March 15, 2004, 2:42:14 PM, you wrote: BJC I'm having a problem using the mkdir() function under windows when the BJC directory containts a special character. For instance, the directory BJC Someone's Files, a forward slash is added before the 's and the directory BJC returns an error. Is there a way around this? This works fine for me on a Windows XP box: ? if (mkdir(D:\bob's) == TRUE) { echo Directory created; } else { echo Failed to create directory; } ? how are you building the directory name? Or did you mean some other special characters? -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] use of @ operator to suppress errors
On 15 March 2004 12:12, Stuart wrote: Ben Joyce wrote: On the contrary, the @ prefix suppresses all errors for the block of code it precedes where a block is a function or variable. Essentially it sets error_reporting to 0 while it evaluates that block. In fact, to be completely accurate, @ is an operator and suppresses error in the *expression* to which it applies -- this means you can affect what it applies to by using parentheses. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with storing multiple values in session variables.
Arer you using session_destroy(), where your script ends... if it's not the case, try using cookies to destroy sessio after a period of time. Hope that helps.. Nitin - Original Message - From: Vimala S.P. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 15, 2004 5:25 PM Subject: [PHP] help with storing multiple values in session variables. Hi, I have php configured to use sessions. I have a web-database application and have the following problem with sessions I fetch values from database and these values get passed across forms either with POST for submit opion OR GET with href. Now i have problem passing unicode strings with href and GET. Embedding unicode values with get does not work out. I cannot use POST method here since i navigate with href. So i tried assiging the value to a SESSION variable. For the first time the application works, but if i refresh and try with a different href link, always the first assigned value only gets passed? What do i do to change the value of session variable in the same session? I cannot use global variables since, i have register globals off? Is there any way of passing unicode strings properly with href and get? I'm almost in completion where this problem croped? Any idea how to solve. -vimala/. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching URL#target params
Chris, et al -- ...and then David T-G said... % % ...and then Chris Hayes said... % % ... % % maybe via a javascript detour? % % Can't do that since I'm trying to write code that can handle the old % style call from some page that hasn't been updated, which means that I % don't control it. All of my pages that point to help, of course, will % have been fixed already :-/ After thinking about this I suddenly realized that such a JS detour would fit well in my main help script, since that is what would catch the http://URL#target link whether it can display it or not. So in my script, when no param is specified, I would need some code to see what the #target is and, if present, reload with the proper ?req=target link. That might work well. So now, if I could stand the JS in my script, can anyone write me some code I can have? :-) Thanks again HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] catching URL#target params
Il lun, 2004-03-15 alle 15:55, David T-G ha scritto: Sebastiano, et al -- ...and then Seba said... % % I think that the only way to catch it is to rewrite the URL. % % 1)Write pages with appropriates links. Somethink like % href='www.yoursite.com/anchor_target/index.php' Hmmm... Do you mean that I should write the calling page this way? I can't do that; I'm planning for pages that I don't own that may not be updated (or even formed properly from the start). Or do you mean I create a subdir and index.php file for every possible link target? Ugh; there are way too many of those. Given a URL like http://web-folio.net/help.php#delcoll that should look like http://web-folio.net/help.php?req=delcoll for the new script, what do I put where in my site dir? The first one. But if you do not own the pages I have not any idea to solve the problem. % % 2)Create e rewrite rule in the htacces file. OK. % % % 3)Catch the target value from the php page parsing the rewritten URL % www.yoursite.com/index.phpanchor=target That sounds good, I think. % % I did it and it works. Great! Now tell me more :-) % % % Sebastiano Thanks HAND :-D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printing landscape
Lou Apolonia wrote: Is there a function/parameter that tells the printer to print in landscape? I believe I've searched through the Printer Functions and haven't encountered such a thing. Any help is appreciated. L Do you mean how is the output printed on the client machine? Then use css: @media print { size: landscape; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with storing multiple values in session variables.
--- Vimala S.P. [EMAIL PROTECTED] wrote: Is there any way of passing unicode strings properly with href and get? You can pass anything as a URL variable if you URL encode it. That's what URL encoding is for: http://www.php.net/url_encode Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming mid-2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] categorizing and array mapping
Hi David, Are you mean, complete categori tree? I would be take this step: 1). Determine category level. 2). Loop for count of level. 2.1). Collect all category in level number. 2.2). If is root category save this. 2.3). If isn't root category, loop inside data and find subcategory for it. Emm..., I use this for printing category tree in my project. I guess this too many eat memory, any ideas? but it work properly, and support unlimited level category :)), but I can provide you the code because this project is one package, I worry you don't understand if I attach a bit code. I hope with this litte pieces, you can found the algorithm. I hope don't missing something. :( Good Luck, Firman - Original Message - From: David T-G [EMAIL PROTECTED] To: PHP General list [EMAIL PROTECTED] Sent: Monday, March 15, 2004 9:45 PM Subject: [PHP] categorizing and array mapping -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printing landscape
Hi Lou, Printer function to do that is printer_set_option() http://www.php.net/manual/en/function.printer-set-option.php The code might be like this: --- begin code --- $handle = printer_open(); printer_set_option($handle, PRINTER_ORIENTATION, PRINTER_ORIENTATION_LANDSCAPE); .. --- end code --- PS: This function only available under Windows and I cannot found javascript function to do that, if you found it, please tell me. Good Luck, Firman - Original Message - From: Lou Apolonia [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 15, 2004 9:35 PM Subject: [PHP] Printing landscape Is there a function/parameter that tells the printer to print in landscape? I believe I've searched through the Printer Functions and haven't encountered such a thing. Any help is appreciated. L -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: An extension to CREATE zips??
I already made something like this on Linux using the exec function and zip command. You'll need to find a command line zip utility for Windows. But be very careful on using data sent by the user for exec'ing. Regards, Rafael http://cifradasweb.net/ Brian J. Celenza [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there function library capable of creating zip files and adding files to a zip archive under the windows/apache platform? After some extensive browsing I can only turn up read-only access functions. Thank you, Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List of all defined constants
Hi Marco, You can use get_defined_constans(void) -- begin code -- print_r(get_defined_constants()); -- end code -- Good Luck, Firman - Original Message - From: Marco Schuler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 15, 2004 9:23 PM Subject: [PHP] List of all defined constants Hi How can I get a list of all constants defined with define()? -- Grüsse Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regex help
Hi, I know this is pretty easy to do but I am horrorable at working with regular expressions and was wondering if anybody might take a min to help please. I will have a variable: $the_extention which will have a value like:98797-234234--2c-something-2c How do I take out the part which will always start with --2c and will always end with -2c eg: Using the above variable I want to do something like $second_extention= use_regex_here($the_extention) (value of $second_extention becomes: 98797-234234) A good baby steps tutorial on regex too would be appreciated. Thanks in advance, Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Regex help
Ryan A mailto:[EMAIL PROTECTED] on Monday, March 15, 2004 9:07 AM said: I know this is pretty easy to do but I am horrorable at working with regular expressions and was wondering if anybody might take a min to help please. in that case you should get the regex coach (easy to find via google). it's great! I will have a variable: $the_extention which will have a value like:98797-234234--2c-something-2c How do I take out the part which will always start with --2c and will always end with -2c by using () around the part you want to grab. ?php $string = 98797-234234--2c-something-2c; $pattern = /\d{5}-\d{6}--2c-(.*)-2c/; preg_match($pattern, $string, $matches); print_r($matches); ? A good baby steps tutorial on regex too would be appreciated. there's lots of those. google can help you find them. try regular expression tutorial or some variant of that. hth, chris. p.s. i think you want extension not extention. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex help
On Tuesday 16 March 2004 01:06, Ryan A wrote: I know this is pretty easy to do but I am horrorable at working with regular expressions and was wondering if anybody might take a min to help please. I will have a variable: $the_extention which will have a value like:98797-234234--2c-something-2c How do I take out the part which will always start with --2c and will always end with -2c For something as simple and predictable as that using regex seems to be an overkill. The simple string functions ought to be adequate. explode() might be all you need. eg: Using the above variable I want to do something like $second_extention= use_regex_here($the_extention) (value of $second_extention becomes: 98797-234234) A good baby steps tutorial on regex too would be appreciated. google -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* When I left you, I was but the pupil. Now, I am the master. - Darth Vader */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex help
I will have a variable: $the_extention which will have a value like: 98797-234234--2c-something-2c How do I take out the part which will always start with --2c and will always end with -2c You could use preg_replaces, like so: $result = preg_replace('/--2c.+-c/', '', $the_extention); That matches anything between '--2c' and '-2c' and replaces it with ''. You could also use preg_match, like so: preg_match('/^(.+)--2c.+-c$/', $the_extention, $matches); $matches[1] should contain the substring you need. A good baby steps tutorial on regex too would be appreciated. Chapter 7 of Learning Perl is an excellent tutorial and basic reference. http://www.oreilly.com/catalog/lperl3/ As usual, the trusty PHP manual also has good information: http://www.php.net/manual/en/pcre.pattern.syntax.php - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex help
At 6:06 PM +0100 3/15/04, Ryan A wrote: I know this is pretty easy to do but I am horrorable at working with regular expressions and was wondering if anybody might take a min to help please. I will have a variable: $the_extention which will have a value like:98797-234234--2c-something-2c How do I take out the part which will always start with --2c and will always end with -2c I'd be interested in the answer to this question as well. Seems like it should be easy. A good baby steps tutorial on regex too would be appreciated. This is a good one: http://www.regular-expressions.info/tutorial.html This google search turned up many tutorials: http://tinyurl.com/2r3rf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Regex help
Hey, Thanks guys. I did search on google first for a tutorial, problem is with something as widely used as regular expressions there are LOTS of results...I felt it would be better to ask if anyone has a favourite.. ie: if you learnt it off the web and not via the manual. The last time I had this problem was with cookies and sessions, I found the links I got from the people on this list much better than the examples in the manual...after learning from the web I did go back to the manual and understood thing much better. Cheers, -Ryan On 3/15/2004 6:18:38 PM, Chris W. Parker ([EMAIL PROTECTED]) wrote: Ryan A mailto:[EMAIL PROTECTED] on Monday, March 15, 2004 9:07 AM said: I know this is pretty easy to do but I am horrorable at working with regular expressions and was wondering if anybody might take a min to help please. in that case you should get the regex coach (easy to find via google). it's great! I will have a variable: $the_extention which will have a value like:98797-234234--2c-something-2c How do I take out the part which will always start with --2c and will always end with -2c by using () around the part you want to grab. ?php $string = 98797-234234--2c-something-2c; $pattern = /\d{5}-\d{6}--2c-(.*)-2c/; preg_match($pattern, $string, $matches); print_r($matches); ? A good baby steps tutorial on regex too would be appreciated. there's lots of those. google can help you find them. try regular expression tutorial or some variant of that. hth, chris. p.s. i think you want extension not extention. :) -- PHP General Mailing List (http://www.php.net/) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] failed to open stream: No such file or directory in
Hello I know that problem is related how I include library file (lib_main.php). I just don't understand what I do wrong: lib_main.php is located at /var/www/html/lib/lib_main.php When I include in the index.phplocated at /var/www/html/ I do the following include ('lib/lib_main.php'); // this works fine But When I try to declare the library in /var/ww/html/account/ include('lib/account/lib_main.php'); It gives me the error message: Warning: main(lib/account/lib_main.php): failed to open stream: No such file or directory in /var/www/html/account/index.php on line 6 I have no idea what is wrong here _ FREE pop-up blocking with the new MSN Toolbar get it now! http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] failed to open stream: No such file or directory in
Hello Mike, Monday, March 15, 2004, 5:43:14 PM, you wrote: MM But When I try to declare the library in /var/ww/html/account/ MM include('lib/account/lib_main.php'); lib_main.php = /var/www/html/lib/lib_main.php index.php= /var/www/html You are including files RELATIVE to the location of the script. At the point in which you try to include the lib_main file, you are currently in the account directory, so it's trying to look for: /var/www/html/account/lib/account/lib_main.php which, needless to say, doesn't exist. A good solution to save you some hassle will be to define a global variable/constant called something like $basedir and set that. $basedir = /var/www/html; Now just use this in all your include lines: include $basedir/lib/lib_main.php; This will work from *anywhere* and not fail. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex help
On 15 Mar 2004 Eric Gorr wrote: which will have a value like:98797-234234--2c-something-2c How do I take out the part which will always start with --2c and will always end with -2c I'd be interested in the answer to this question as well. Seems like it should be easy. It is easy. I agree with whoever said string functions were a better solution, regexp is overkill unless there is more variaiton in the data than what was presented. That said, here are some possibilities; all but the first assume that the -- is always there: - If the lengths are constant just use substr to pull out the first 11 characters. - Find the -- with strpos and then use that in a substr call to take just the part to the left. - Use explode to separate the string at the -- or --2c. - For two numeric strings separated by a dash use a regexp approach something like this: if (preg_match(/^(\d*-\d*)--2c/, $string, $matches)) $left_part = $matches[1]; -- Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] failed to open stream: No such file or directory in
thanks for explanation Is it possible in php.ini declare $basedir(for libraries)? From: Richard Davey [EMAIL PROTECTED] Reply-To: Richard Davey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP] failed to open stream: No such file or directory in Date: Mon, 15 Mar 2004 17:55:13 + Hello Mike, Monday, March 15, 2004, 5:43:14 PM, you wrote: MM But When I try to declare the library in /var/ww/html/account/ MM include('lib/account/lib_main.php'); lib_main.php = /var/www/html/lib/lib_main.php index.php= /var/www/html You are including files RELATIVE to the location of the script. At the point in which you try to include the lib_main file, you are currently in the account directory, so it's trying to look for: /var/www/html/account/lib/account/lib_main.php which, needless to say, doesn't exist. A good solution to save you some hassle will be to define a global variable/constant called something like $basedir and set that. $basedir = /var/www/html; Now just use this in all your include lines: include $basedir/lib/lib_main.php; This will work from *anywhere* and not fail. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Get business advice and resources to improve your work life, from bCentral. http://special.msn.com/bcentral/loudclear.armx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] failed to open stream: No such file or directory in
Il lun, 2004-03-15 alle 18:43, Mike Mapsnac ha scritto: Hello I know that problem is related how I include library file (lib_main.php). I just don't understand what I do wrong: lib_main.php is located at /var/www/html/lib/lib_main.php When I include in the index.phplocated at /var/www/html/ I do the following include ('lib/lib_main.php'); // this works fine But When I try to declare the library in /var/ww/html/account/ Is the index.php file here? include('lib/account/lib_main.php'); /var/ww/html/account/ + include('lib/account/lib_main.php'); = /var/ww/html/account/lib/account/lib_main.php. Is there the file lib_mail.php in this folder? Use include('../lib/lib_main.php'). It gives me the error message: Warning: main(lib/account/lib_main.php): failed to open stream: No such file or directory in /var/www/html/account/index.php on line 6 I have no idea what is wrong here _ FREE pop-up blocking with the new MSN Toolbar get it now! http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/ Seba -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] failed to open stream: No such file or directory in
Hello Mike, Monday, March 15, 2004, 6:15:04 PM, you wrote: MM Is it possible in php.ini declare $basedir(for libraries)? Not exactly, but you can add a path to the include path list which should have the same end result. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I have a problem In Mail Function
Hi In a web application I need to send mail for each members whith a different content . mail message must be in HTML Format and 1256 code page I call mail() functoin in a simple loop to send multiple mail message with differrent content. now I want know that is any body know better method to do it ?? but I have bigest problem when I send message to yahoo mail server ,yahoo rout my message to bulk mail and I cant solve this problem please tell me if you have know solution. my send mail is come below: function send_mail($to,$subject,$message){ $headers = MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=windows-1256\r\n; $headers .= From: Me [EMAIL PROTECTED]\r\n; $headers .= Return-path: Me [EMAIL PROTECTED]\r\n; $headers .= Reply-To: Me [EMAIL PROTECTED]\r\n; // $headers .= Bcc: $to \r\n; if (mail($to, $subject, $message, $headers)) print($to Send Ok!br); else print(b$to Send Problem/b!br); } thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] tracking emails
Hi, Been searching for this topic on google, hotscripts and in the archives. I see that this has been discussed a bit in the archives so here goes: Problem: After sending the newsletter try to see how many people have actually opened the email. Solutions presented (from the archive): Ask for reciept (Problem: hotmail, yahoo ignores this) Send as html and call a script via a img tag passing the member id (Problem: html messages is usually off) Ask user to kindly click here to confirm they have recieved the email (Problem: does not work, just pisses them off) Thats what I found so far, is there something I missed or any particlar way YOU do it? Thanks, -Ryan A -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I have a problem In Mail Function
This doesn't sound like it has anything to do with the mail function. It appears that your newsletter is getting caught by their spam filters. --Sam PHP wrote: Hi In a web application I need to send mail for each members whith a different content . mail message must be in HTML Format and 1256 code page I call mail() functoin in a simple loop to send multiple mail message with differrent content. now I want know that is any body know better method to do it ?? but I have bigest problem when I send message to yahoo mail server ,yahoo rout my message to bulk mail and I cant solve this problem please tell me if you have know solution. my send mail is come below: function send_mail($to,$subject,$message){ $headers = MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=windows-1256\r\n; $headers .= From: Me [EMAIL PROTECTED]\r\n; $headers .= Return-path: Me [EMAIL PROTECTED]\r\n; $headers .= Reply-To: Me [EMAIL PROTECTED]\r\n; // $headers .= Bcc: $to \r\n; if (mail($to, $subject, $message, $headers)) print($to Send Ok!br); else print(b$to Send Problem/b!br); } thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex help (SOLVED)
Hey Guys, Solved this, took your advise and avoided regex as its an overkill. Case you're interested: $th_var=98797-234234--2c-something-2c; $piece = explode(--2, $th_var); echo $piece[0]; (and if i want to use the second part... $piece[1] ) Thanks to everyone who gave me examples, links and suggested alternatives like explode(), but personally I thought explode too was a regex..:-(. Cheers, -Ryan A -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Certification
HI, I need information about the php certification, from www.expertrating.com . Does this site has good market reputation? Does www.php.net has some plans to introduce certification path? Comments welcome. Thanks, Sheri, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Certification
On Mon, 15 Mar 2004, Sheeraz fazal wrote: I need information about the php certification, from www.expertrating.com . Does this site has good market reputation? Does www.php.net has some plans to introduce certification path? No plans from us, no. Running a certification program is a lot of work and I would prefer to see developers develop, not try to manage a certification program. As for the www.expertrating.com thing? Never heard of it. If a resume crossed my desk with a reference to something like that on it I would probably chuckle and think the person got bilked out of the $9.95 it apparently costs. It may of course be very good, I have no idea, I just don't hold certification programs in very high regard in general. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex help (SOLVED)
Thanks to everyone who gave me examples, links and suggested alternatives like explode(), but personally I thought explode too was a regex..:-(. explode() is not, split() is. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Pear Package...
Hi! I saw the Pear packages that are originally stored in /usr/local/lib/php/. This occur when I compile PHP. Problem is they are different from the ones I downloaded from the pears.php.net website. So, I enclosed those files into the website's directory, along with all other website files. That way, I can use those instead of the one from /usr/local/lib/php/. However, I have a problem. When I run the web script, PHP still use the Pear files in /usr/local/lib/php/*** instead of the one I use along with the web files. I tried the include and require function but no luck. Why is that? What workaround do I need on this? FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: tracking emails
Ryan A [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Problem: After sending the newsletter try to see how many people have actually opened the email. Send as html and call a script via a img tag passing the member id (Problem: html messages is usually off) HTML is the only method I've ever used. If it's off, I don't think you'll find a solution. For those that have it on, at least you'll see them. Another trick that might help, if you're mail server can handle it, is to have a reply-to address like this: bounces-id@domain.com Some mail servers can be configured to ignore the '-' and everything after it, letting you receive all your bounces at one address, but knowing by the 'To' field which member it is coming from. I know this doesn't address your problem of being able to see who actually reads the message, but it will help you know who isn't even getting the message to begin with. Thanks, -Ryan A -- Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Certification
Give a good graphics guy some $$ and he'll make you one of the best certificates that your $$ can buy...that does not mean that you can actually program in the language thats written on the certificate... When I was learning computers I studied COBOL, Hated it and cant remember crap about it now...not even 2 lines...but my (old) certificate says I'm pretty good at it :-) Basically it all comes down to how good you can actually prove yourself in your field..certificates most of the time are not worth the paper they are printed on but look good once you hang it on the wall ;-) Just my $0.2 Cheers, -Ryan * HI, I need information about the php certification, from www.expertrating.com . Does this site has good market reputation? Does www.php.net has some plans to introduce certification path? Comments welcome. Thanks, Sheri, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pear Package...
On Monday 15 March 2004 02:15 pm, Scott Fletcher wrote: Hi! hi I saw the Pear packages that are originally stored in /usr/local/lib/php/. This occur when I compile PHP. Problem is they are different from the ones I downloaded from the pears.php.net website. So, I enclosed those files into the website's directory, along with all other website files. That way, I can use those instead of the one from /usr/local/lib/php/. However, I have a problem. When I run the web script, PHP still use the Pear files in /usr/local/lib/php/*** instead of what does ini_get('include_path') return? Try doing ini_set('include_path', '.:/usr/local/lib/php') php is probably searching for includes in /usr/local/lib/php first. Also, consider reinstalling what you've download from pear using pear's cli; `pear install DB`, for example the one I use along with the web files. I tried the include and require function but no luck. Why is that? What workaround do I need on this? FletchSOD -- Evan Nemerson [EMAIL PROTECTED] http://coeusgroup.com/en -- ...the whole idea of revenge and punishment is a childish daydream. Properly speaking, there is no such thing as revenge. Revenge is an act which you want to commit when you are powerless and because you are powerless: as soon as the sense of impotence is removed, the desire evaporates also. -George Orwell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Pear Package...
Hi Scott, What you need is to set the include_path http://www.php.net/manual/en/configuration.directives.php#ini.include-path Greg -- phpDocumentor http://www.phpdoc.org Scott Fletcher wrote: Hi! I saw the Pear packages that are originally stored in /usr/local/lib/php/. This occur when I compile PHP. Problem is they are different from the ones I downloaded from the pears.php.net website. So, I enclosed those files into the website's directory, along with all other website files. That way, I can use those instead of the one from /usr/local/lib/php/. However, I have a problem. When I run the web script, PHP still use the Pear files in /usr/local/lib/php/*** instead of the one I use along with the web files. I tried the include and require function but no luck. Why is that? What workaround do I need on this? FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: tracking emails
On 3/15/2004 11:19:13 PM, Rob Adams ([EMAIL PROTECTED]) wrote: Ryan A [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Problem: After sending the newsletter try to see how many people have actually opened the email. Send as html and call a script via a img tag passing the member id (Problem: html messages is usually off) HTML is the only method I've ever used. If it's off, I don't think you'll find a solution. For those that have it on, at least you'll see them. Another trick that might help, if you're mail server can handle it, is to have a reply-to address like this: bounces-id@domain.com Some mail servers can be configured to ignore the '-' and everything after it, letting you receive all your bounces at one address, but knowing by the 'To' field which member it is coming from. I know this doesn't address your problem of being able to see who actually reads the message, but it will help you know who isn't even getting the message to begin with. Hey Rob, Thanks for replying. Yep, am going with html but am having a few problemsyahoo and hotmail totally screw up the email and I dont get any confirmation :-(, after going into view- source I see that the IMG src address is being over written by them.. Codes pretty simple (but works) you can compare it to your code if you need to. //PHP file $connected=mysql_connect($hostt, $userr, $passs) or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ($db); $query = insert into read_member values('$mem'); $result = mysql_query($query); if(!$result){ echo 'Info not inserted.'. mysql_error();exit;} $mimetype=image/gif; // Mime type of file Header(Content-type: ); readfile ($filename); and in the HTML mail: test img src=http://domain/testing/test_pass_image.php?mem=Ryan1filename=dot.gif; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pear Package...
Aw! Never knew what the php's include_path is for... So, that fixed the problem by just setting it to the website directory. Thanks, FletchSOD Evan Nemerson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Monday 15 March 2004 02:15 pm, Scott Fletcher wrote: Hi! hi I saw the Pear packages that are originally stored in /usr/local/lib/php/. This occur when I compile PHP. Problem is they are different from the ones I downloaded from the pears.php.net website. So, I enclosed those files into the website's directory, along with all other website files. That way, I can use those instead of the one from /usr/local/lib/php/. However, I have a problem. When I run the web script, PHP still use the Pear files in /usr/local/lib/php/*** instead of what does ini_get('include_path') return? Try doing ini_set('include_path', '.:/usr/local/lib/php') php is probably searching for includes in /usr/local/lib/php first. Also, consider reinstalling what you've download from pear using pear's cli; `pear install DB`, for example the one I use along with the web files. I tried the include and require function but no luck. Why is that? What workaround do I need on this? FletchSOD -- Evan Nemerson [EMAIL PROTECTED] http://coeusgroup.com/en -- ...the whole idea of revenge and punishment is a childish daydream. Properly speaking, there is no such thing as revenge. Revenge is an act which you want to commit when you are powerless and because you are powerless: as soon as the sense of impotence is removed, the desire evaporates also. -George Orwell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Pear Package...
Aw! Never knew what the php's include_path is for when I saw it in the php.ini some times ago... So, that fixed the problem by just setting it to the website directory. Thanks, FletchSOD Greg Beaver [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Scott, What you need is to set the include_path http://www.php.net/manual/en/configuration.directives.php#ini.include-path Greg -- phpDocumentor http://www.phpdoc.org Scott Fletcher wrote: Hi! I saw the Pear packages that are originally stored in /usr/local/lib/php/. This occur when I compile PHP. Problem is they are different from the ones I downloaded from the pears.php.net website. So, I enclosed those files into the website's directory, along with all other website files. That way, I can use those instead of the one from /usr/local/lib/php/. However, I have a problem. When I run the web script, PHP still use the Pear files in /usr/local/lib/php/*** instead of the one I use along with the web files. I tried the include and require function but no luck. Why is that? What workaround do I need on this? FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Certification
Hello Sheeraz, Monday, March 15, 2004, 4:05:42 PM, you wrote: Sf I need information about the php certification, from www.expertrating.com . Sf Does this site has good market reputation? Sf Does www.php.net has some plans to introduce certification path? Unless they are internationally and industry recognised like the Novell, Cisco, Oracle or Microsoft certificates it's probably not worth the money (if any?) involved in obtaining it. You would be better off spending your time working on a solid portfolio that showcases both sites AND code that you've written. If you already have those then I don't see how that expertrating thing can hurt, but don't bank on it holding too much sway. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: tracking emails
Ryan A [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Yep, am going with html but am having a few problemsyahoo and hotmail totally screw up the email and I dont get any confirmation :-(, after going into view- source I see that the IMG src address is being over written by them.. Ok - one thing to try... I've noticed when sending HTML emails from my client, it defaults to sending the pictures with the email. This makes it so that the picture links to the email, instead of to your webserver. I unchecked that option in my own client and sent an email to my hotmail account. I checked the source and it was unmodified. If you can try the same thing, let me know. If it still doesn't work, there may be another method you can try, ie: http://domain.com/pics/id/blank.gif This might fool hotmail. You'd have to create a php file named pics and configure your web server to run it as php, or just name it pics.php. -- Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] current url function
hey! i am working in an open source development, and have done a function that gives me the current url, but i need it to work always, everywhere, in every server with all browsers, could you tell me if you think it will or if you have any suggestions? here is the code: /* Returns the current URL TODO: The function can not manage nor return user and pass in the URL if present because it seems that you can not fetch them from PHP (or at least I dont't know how to do it :P) LIMITATIONS: fragment (after # sign) can not be fetched since it is a client-side feature */ function url($host=true, $querystring=true) { $url = ''; if($host) { if ( (!empty($_SERVER['HTTPS']) $_SERVER['HTTPS']=='on') || (!empty($_ENV['HTTPS']) $_ENV['HTTPS']=='on') ) $url = 'https://'; else $url = 'http://'; $url .= !empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; //if((int)$_SERVER['SERVER_PORT']!=80) $url .= ':' . $_SERVER['SERVER_PORT']; } //$url .= $_SERVER['SCRIPT_NAME']; //if($querystring !empty($_SERVER['QUERY_STRING'])) $url .= '?' . $_SERVER['QUERY_STRING']; if($querystring) $url .= $_SERVER['REQUEST_URI']; else $url .= $_SERVER['PHP_SELF']; return $url; } thanx in advance! luis. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dbg extension...
hey guys, i have a question on dbg extension, i want to get debug details using the functions from php, ie. dbg_get_profiler_results, but they return nothing... i am developing on windows using apache and php 4.3, any suggestions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] current url function
Luis Mirabal wrote: hey! i am working in an open source development, and have done a function that gives me the current url, but i need it to work always, everywhere, in every server with all browsers, could you tell me if you think it will or if you have any suggestions? here is the code: /* Returns the current URL TODO: The function can not manage nor return user and pass in the URL if present because it seems that you can not fetch them from PHP (or at least I dont't know how to do it :P) False, check http://sk2.php.net/manual/en/features.http-auth.php LIMITATIONS: fragment (after # sign) can not be fetched since it is a client-side feature True */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] current url function
i checked http://sk2.php.net/manual/en/features.http-auth.php, but it doesnt shows how to see if i passed user:pass in the url. i try http://user:[EMAIL PROTECTED]/ and dumped globals, and there is nothing... any ideas? Marek Kilimajer [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Luis Mirabal wrote: hey! i am working in an open source development, and have done a function that gives me the current url, but i need it to work always, everywhere, in every server with all browsers, could you tell me if you think it will or if you have any suggestions? here is the code: /* Returns the current URL TODO: The function can not manage nor return user and pass in the URL if present because it seems that you can not fetch them from PHP (or at least I dont't know how to do it :P) False, check http://sk2.php.net/manual/en/features.http-auth.php LIMITATIONS: fragment (after # sign) can not be fetched since it is a client-side feature True */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] current url function
Hello Luis, Tuesday, March 16, 2004, 1:41:49 AM, you wrote: LM i checked LM http://sk2.php.net/manual/en/features.http-auth.php, but it doesnt LM shows how to see if i passed user:pass in the url. i try LM http://user:[EMAIL PROTECTED]/ and dumped globals, and there is nothing... any LM ideas? If you are running PHP as an Apache module (and not CGI) then a correctly validated user will have their details in: $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] There is a whole chapter on this (16) in the manual. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] e - comerce website
Hai.. I have a homework from my scholl. We must make a simple website of e - comerce use php. I just still confuse to use the session in this work. And I must make a different page for a administrator that have a full access and a just user. But I still don't know how to make it. There is an order and a checkout if we want to leave the website. Please help me, I just have time 1 week to finish it. Warm regards: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem with mkdir() under windows.
mmmh... i think your problem isn't in mkdir, it is in evil MAGIC QUOTES! (they are on by default) if you are getting the name of the directory from GET, POST or COOKIE, check the get_magic_quotes_gpc(), else check get_magic_quotes_runtime(), if the problem is in get_magic_quotes_runtime(), you can do set_magic_quotes_runtime(0) beforegetting the directory name, so it won't be quoted, but if the problem is in get_magic_quotes_gpc(), you will have to do something like: if(get_magic_quotes_gpc()) stripslashes($dirname); luis. Brian J. Celenza [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] I'm having a problem using the mkdir() function under windows when the directory containts a special character. For instance, the directory Someone's Files, a forward slash is added before the 's and the directory returns an error. Is there a way around this? Thank you Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printing landscape
actually, you can control your printer, look: http://www.php.net/manual/en/function.printer-set-option.php you have to do: $handle = printer_open(); printer_set_option ($handle, PRINTER_ORIENTATION , PRINTER_ORIENTATION_LANDSCAPE); printer_close($handle); you've got many interesting options with this function. ( These functions are only available under Windows 9.x, ME, NT4 and 2000. They have been added in PHP 4.0.4.) and you can do something about the phase of the moon too, look here :P http://www.phpclasses.org/browse/package/1201.html?download=targz Cheers, Luis. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Efficieny: Include vs Array vs Function
Pardon me if this subject has been discussed, but a search of the archive didn't bring up much of anything. Bear with me while I dish out some details. My question concerns the efficiency of using multiple file includes versus storing segments of data in one include as arrays or functions. While rebuilding the core of my web site network and, after reading some negative things about file includes, I was forced to rethink how I am structuring things. Here are some details: *One domain serving, with around 5 sites as subdomains currently and more soon to come. *Each script on every site includes a global file that has sessions stuff and network-wide functions. *Each script includes a header.php file for the specific site's layout. *Each script includes a footer.php for ditto. *I am currently on a virtual server, but obviously will need to move on to a dedicated very shortly. It is my understanding, as disk reads are so slow, that it is not a good idea to include multiple files. I always knew this, but I never really thought about it. While thinking of how to optimize it, I considered merging header.php and the global file as one. However, I then realized some scripts access the database before including the header as to dynamically change meta tags (say, for Articles). I could use output buffering but, well, I'm not going to. So I was thinking of making one include file that contained the following: The former global contents (which I'd have to use a batch file to manage this section of the file for all sites at once, no big deal), header.php as a function, and the same for footer.php. My main question is, will this, with any certainty, be more considerably more efficient than simply including three files? Would it be more efficient to put header and footer in arrays? Keep in mind I'd have to use eval() on header as all of my headers contain some php code. Another method that would involve using eval() would be to store the headers and footers in databases, but I highly doubt this would be more efficient than storing them in arrays or functions. Another situation, which I am quite certain would benefit from using a function instead of an include, is that of scripts using forms. These forms need to be included on more than one line, such as when the data is empty or invalid and the form needs to be shown again. But forms are relatively small compared to most of my headers. So there you have it. How does an include compare to a function or a function to an array? Is there a big difference in how the data is stored in memory with a function versus an array? Would one choice be more efficient on a virtual server, while another more efficient on a dedicated (because of memory considerations)? I'm going to just assume the database is not the most efficient choice here. Thank you to all those who will respond, and even those who simply read this whole message. -Rob Paxon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: windows 2003 server configuration
http://dedntfaq.hostingsupport.com/iis6_php_install.txt regards, nadim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php