|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Tue Jan 28 2003 - 03:40:15 CST
php-general Digest 28 Jan 2003 09:40:15 -0000 Issue 1849
Topics (messages 133302 through 133356):
Re: Found a PHP bug!!!!!!!!!
133302 by: Leif K-Brooks
133303 by: Chris Shiflett
133304 by: White Wolf
133305 by: Scott Fletcher
133308 by: White Wolf
help needed with session variables
133306 by: Pushpinder Singh Garcha
133309 by: 1LT John W. Holmes
Help : I need modify a the header information in a JPEG image file
133307 by: Patricio Vera S.
133310 by: Chris Shiflett
133311 by: Chris Shiflett
multiple entry forms !!
133312 by: scott
133314 by: Philip Hallstrom
133332 by: Justin French
133339 by: Manuel Lemos
output of fread() is blank
133313 by: Guru Geek
133315 by: Jason Sheets
133316 by: Philip Hallstrom
133317 by: Philip Olson
Anyone?? file uploads received, but mangled
133318 by: af.ax-im.com
133326 by: 1LT John W. Holmes
133333 by: af.ax-im.com
mail () format
133319 by: Bruce Levick
133320 by: Philip Hallstrom
Re: output of fread() is blank - FIXED
133321 by: Guru Geek
PHP vs Perl for system scripts (non-web)
133322 by: Paul Chvostek
133330 by: Alex
133331 by: Philip Hallstrom
133353 by: Chris Hayes
Re: output of fread() is blank - FIXED - updated
133323 by: Guru Geek
133325 by: Philip Olson
133327 by: Guru Geek
HELP session cache limiters
133324 by: Didier McGillis
133328 by: Matt
133329 by: Didier McGillis
Too many 'linespaces'
133334 by: Lars Espelid
133335 by: Tom Rogers
133337 by: Lars Espelid
133340 by: 1LT John W. Holmes
133341 by: Tom Rogers
Re: Session Variables
133336 by: Leif K-Brooks
Access to Pear
133338 by: Warren Vail
133342 by: jacob.keystreams.com
133343 by: jacob.keystreams.com
How to convert HTML Table structure to DB schema or XML format
133344 by: Tariq Murtaza
PHP Page Refresh on Redirection
133345 by: Phil
133346 by: 1LT John W. Holmes
133348 by: Justin French
Good way to organize code using classes???
133347 by: . Nilaab
Need Guru's Help
133349 by: Tariq Murtaza
133355 by: Chris Hayes
printing
133350 by: Shaun van den Berg
133351 by: 1LT John W. Holmes
133352 by: Leif K-Brooks
133356 by: Paul Chvostek
Thread safety
133354 by: Olga Tonkonog
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
doubleval
doubleval -- Alias of floatval()
<http://www.php.net/manual/en/function.floatval.php>
Description
This function is an alias of floatval()
<http://www.php.net/manual/en/function.floatval.php>.
Note: This alias is a left-over from a function-renaming. In older
versions of PHP you'll need to use this alias of the floatval()
<http://www.php.net/manual/en/function.floatval.php> function,
because floatval()
<http://www.php.net/manual/en/function.floatval.php> wasn't yet
available in that version.
Scott Fletcher wrote:
>Double and Float are not exactly the same thing.
>
>Double is ---> 11.123
>Float is ------> .00238823993
>
>"Leif K-Brooks" <eurleif
buyer-brokerage.com> wrote in message
>news:3E359A94.7070406
buyer-brokerage.com...
>
>
>>No, it's floatval. Doubleval is an alias left over from hwen floats
>>were called doubles...
>>
>>Scott Fletcher wrote:
>>
>>
>>
>>>Whoop! FOund it, it is doubleval()...
>>>
>>>
>>>What does settype() do exactly????
>>>
>>>
>>>"Scott Fletcher" <scott
abcoa.com> wrote in message
>>>news:20030127203843.29862.qmail
pb1.pair.com...
>>>
>>>
>>>
>>>
>>>>I do know that integer, string, double, float, etc.... are different..
>>>>
>>>>
>I
>
>
>>>>have been using hte appropriate method like in javascript and c
>>>>
>>>>
>>>>
>>>>
>>>programming,
>>>
>>>
>>>
>>>
>>>>like converting it to integer and so on.... But when I start using PHP,
>>>>
>>>>
>I
>
>
>>>>find no such document of it and I have been using it for 3 years without
>>>>
>>>>
>a
>
>
>>>>problem. I asked people is there such a thing as converting it by using
>>>>
>>>>
>>>>
>>>>
>>>the
>>>
>>>
>>>
>>>
>>>>function and they told me there is no such a thing and that it is done
>>>>automatically... Now my time is a little bit wasted. So, I will
>>>>
>>>>
>correct
>
>
>>>>the problem with the php script...
>>>>
>>>>I recently looked up on the manual as Jason Wong instructed me to. I
>>>>havne't found the answer since the document is a little bit mixed up.
>>>>
>>>>Okay, I'm going back to my old way as I did in javascript and c
>>>>
>>>>
>>>>
>>>>
>>>programming.
>>>
>>>
>>>
>>>
>>>>So for php, it would be
>>>>
>>>>floatval() for float...
>>>>strval() for string....
>>>>settype() for whatever......
>>>>intval() for integer....
>>>>
>>>>Um, what about double???
>>>>
>>>>Thanks,
>>>>Scott F.
>>>>
>>>>"Chris Hayes" <chayes
antenna.nl> wrote in message
>>>>news:5.1.1.6.0.20030127211703.014c47f8
pop4.antenna.nl...
>>>>
>>>>
>>>>
>>>>
>>>>>>Re: [PHP] Found a PHP bug!!!!!!!!!
>>>>>>
>>>>>>
>>>>>uh oh...
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>I don't see why a string wouldn't work when I use "08" (string) and
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>match
>>>
>>>
>>>
>>>
>>>>it
>>>>
>>>>
>>>>
>>>>
>>>>>>against the integer 8, or 08.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>They're just different types. Normally PHP is veeery flexible with
>>>>>types, like javascript, but it just can't be flexible for you here
>>>>>
>>>>>
>>>>>
>>>>>
>>>>because
>>>>
>>>>
>>>>
>>>>
>>>>>it needs to choose the most logic to the entire pool of programmers,
>>>>>
>>>>>
>and
>
>
>>>>>
>>>>>
>>>>then
>>>>
>>>>
>>>>
>>>>
>>>>>"08" = a string
>>>>> 8 = a decimal integer
>>>>> 08 = by definition an impossible octal integer, so 0.
>>>>>
>>>>>Since you cannot tell PHP that $var is of a certain type like in
>>>>>
>>>>>
>[other]
>
>
>>>>>programming languages, for example you want it to be treated as an
>>>>>
>>>>>
>>>>>
>>>>>
>>>>integer,
>>>>
>>>>
>>>>
>>>>
>>>>>PHP will handle it as what seems to be the most logic.
>>>>>
>>>>>
>>>>>You can try to use intval (does not alter a variable, only the value as
>>>>>
>>>>>
>>>>>
>>>>>
>>>it
>>>
>>>
>>>
>>>
>>>>>is used in a calculation or an if() statement) or settype (alters the
>>>>>variable).
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>"Kirk Johnson" <kjohnson
zootweb.com> wrote in message
>>>>>>news:B11731D518B5D61183C700A0C98BE0D9FFBE5D
chef...
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>-----Original Message-----
>>>>>>>>From: Scott Fletcher [mailto:scott
abcoa.com]
>>>>>>>>
>>>>>>>>Found a PHP bug, I'm using PHP version 4.2.3. I have been
>>>>>>>>struggling with
>>>>>>>>why PHP code failed to work with the month is August or
>>>>>>>>September
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>I stumbled into this one a short while ago myself. It is not a bug,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>but a
>>>>
>>>>
>>>>
>>>>
>>>>>>>feature! ;) When passing values of 08 or 09 (Aug and Sep), PHP
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>interprets
>>>>
>>>>
>>>>
>>>>
>>>>>>>them as octal numbers (because of the leading 0). However, 08 and 09
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>are
>>>>
>>>>
>>>>
>>>>
>>>>>>>invalid octal numbers, so PHP converts them to zero.
>>>>>>>
>>>>>>>The fixes are numerous:
>>>>>>>- remove the leading zero;
>>>>>>>- add zero to them before passing (addition forces a type
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>conversion
>>>
>>>
>>>
>>>
>>>>to
>>>>
>>>>
>>>>
>>>>
>>>>>>>int);
>>>>>>>- force a type conversion to integer using (int);
>>>>>>>- quote them (when PHP converts a string to an integer, it removes
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>the
>>>>
>>>>
>>>>
>>>>
>>>>>>>leading zero);
>>>>>>>
>>>>>>>Kirk
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>--
>>>>>>PHP General Mailing List (http://www.php.net/)
>>>>>>To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>--
>>The above message is encrypted with double rot13 encoding. Any
>>
>>
>unauthorized attempt to decrypt it will be prosecuted to the full extent of
>the law.
>
>
>>
>>
>>
>
>
>
>
>
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
attached mail follows:
--- Scott Fletcher <scott
abcoa.com> wrote:
> Double and Float are not exactly the same thing.
>
> Double is ---> 11.123
> Float is ------> .00238823993
They are the same thing. Please, read this:
http://www.php.net/manual/en/language.types.php
and this:
http://www.php.net/manual/en/language.types.float.php
Chris
attached mail follows:
"Scott Fletcher" wrote: > Double and Float are not exactly the same thing. > > Double is ---> 11.123 > Float is ------> .00238823993
I am absolutely new to PHP but what is above (since PHP seems to take most of its low-level terminology from C) is a fixed point number and the next is a floating point number, which may not fit into the 8 significant digits what is guaranteed for a float on all platforms. What do I miss?
WW
attached mail follows:
Okay, correction...
Double --> 11.1237 Float --> 0.9999999999999999999999999999999999999999999999999999
Cheers! It's the way it work in C Programming... Double won't be as long or as infinite as the floating point.
"White Wolf" <wolof
freemail.hu> wrote in message
news:20030127213839.96448.qmail
pb1.pair.com...
> "Scott Fletcher" wrote:
> > Double and Float are not exactly the same thing.
> >
> > Double is ---> 11.123
> > Float is ------> .00238823993
>
> I am absolutely new to PHP but what is above (since PHP seems to take most
> of its low-level terminology from C) is a fixed point number and the next
> is a floating point number, which may not fit into the 8 significant
digits
> what is guaranteed for a float on all platforms. What do I miss?
>
> WW
>
>
attached mail follows:
"Scott Fletcher": > Okay, correction... > > Double --> 11.1237 > Float --> 0.9999999999999999999999999999999999999999999999999999 > > Cheers! It's the way it work in C Programming... Double won't be as long > or as infinite as the floating point.
Absolutely wrong (if you would be in a C newsgroup you would even be accused of trolling :-)))
double (in C) means: double precision floating point number
float in C means: floating point number
Float is guaranteed to store 6 significant digits (and usually noone uses it except on some very weird architectures) while double's minimum is 10 significant digits.
WW
attached mail follows:
hello,
I am making use of sessions in my PHp/MySQL Database application. When the user is successfully authenticated against the database, a session is created in following manner:
session_register("valid_user","firstname","lastname");
$valid_user = $login; $firstname = $first_name; $lastname = $last_name;
While I am able to use the $valid_user variable all thru the sesion , when I try to use the $valid_user it works fine (i.e. I am able to access the value) throughout the session, however when I try to use the other two registered session variables i.e firstname and lastname, I am not able to extract the value. Can you suggest what might be going wrong. Note I am locally testing the setup on my Mac.
Many Thanks Pushpinder Singh Garcha _________________________________ Web Architect
attached mail follows:
Are you sure $first_name and $last_name have a value? Double check...
---John Holmes...
----- Original Message -----
From: "Pushpinder Singh Garcha" <pgarcha
adelphia.net>
To: <php-general
lists.php.net>
Sent: Monday, January 27, 2003 4:44 PM
Subject: [PHP] help needed with session variables
hello,
I am making use of sessions in my PHp/MySQL Database application. When the user is successfully authenticated against the database, a session is created in following manner:
session_register("valid_user","firstname","lastname");
$valid_user = $login; $firstname = $first_name; $lastname = $last_name;
While I am able to use the $valid_user variable all thru the sesion , when I try to use the $valid_user it works fine (i.e. I am able to access the value) throughout the session, however when I try to use the other two registered session variables i.e firstname and lastname, I am not able to extract the value. Can you suggest what might be going wrong. Note I am locally testing the setup on my Mac.
Many Thanks Pushpinder Singh Garcha _________________________________ Web Architect
attached mail follows:
Hi,
I new to the php world ant the image too, and I need modify the header information in a JPEG image file, is that possibly? How?
I need put some information in the image at the instant when the user download this from the web site.
Thanks in Advance.
Saludos, Patricio Vera.
___________________________________________________ Yahoo! Móviles Personaliza tu móvil con tu logo y melodía favorito en http://moviles.yahoo.es
attached mail follows:
--- "Patricio Vera S." <pato_php_work
yahoo.es> wrote:
> I new to the php world ant the image too, and I need
> modify the header information in a JPEG image file,
> is that possibly? How?
Those are EXIF headers. I am not sure if there is support for modifying them (aside from doing it manually yourself), but there are some functions that help you read them. Rasmus mentions this in his presentations:
http://talks.php.net/show/oscon2002/46
Hopefully that can get you started.
Chris
attached mail follows:
--- Chris Shiflett <shiflett
php.net> wrote:
> --- "Patricio Vera S." <pato_php_work
yahoo.es> wrote:
> > I new to the php world ant the image too, and I need
> > modify the header information in a JPEG image file,
> > is that possibly? How?
>
> Those are EXIF headers. I am not sure if there is
> support for modifying them (aside from doing it
> manually yourself), but there are some functions that
> help you read them. Rasmus mentions this in his
> presentations:
>
> http://talks.php.net/show/oscon2002/46
>
> Hopefully that can get you started.
After looking into it further, I think the EXIF headers may only exist in jpeg images from digital cameras, so I'm not sure if the information I gave will help any.
Chris
attached mail follows:
hi
looking for some advice
I have a site in progress. user to it have to enter a LOT of information (it will contain a club directory)
in order to try and make it a less unpleasant experience for the user, I want to give them 7 smaller input forms, each one following the other
what would be the correct way to do this, one very large, complex coded php conditional form that does everything, or several smaller ones ?
if I use one form, it will conatin rather a lot of code, but execution would all be handled by the form itself
but if I use multiple smaller forms, each form would need to process the previous forms input, and then display it's inputs for entry
I am also using sessions, which adds a little to complexity
any general good coding practice tips/links would be helpful
thanks
_scott
attached mail follows:
Use several smaller forms and store the results of each into a session variable.
Also store a "got-results-for-form-1" (through 7) that gets set for each of the 7 forms. Once all 7 are set you can do the final processing.
Set the action of each form to say "save.php" and pass in a "saving_what" field". save.php can then do a switch on the saving_what field to determine what needs checking/storing/etc.
Works good for me.
On Mon, 27 Jan 2003, scott wrote:
> hi > > looking for some advice > > I have a site in progress. user to it have to enter a LOT of information (it > will contain a club directory) > > in order to try and make it a less unpleasant experience for the user, I > want to give them 7 smaller input forms, each one following the other > > what would be the correct way to do this, one very large, complex coded php > conditional form that does everything, or several smaller ones ? > > if I use one form, it will conatin rather a lot of code, but execution would > all be handled by the form itself > > but if I use multiple smaller forms, each form would need to process the > previous forms input, and then display it's inputs for entry > > I am also using sessions, which adds a little to complexity > > any general good coding practice tips/links would be helpful > > thanks > > _scott > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
on 28/01/03 10:20 AM, scott (scott
sporticia.com) wrote:
> hi > > looking for some advice > > I have a site in progress. user to it have to enter a LOT of information (it > will contain a club directory) > > in order to try and make it a less unpleasant experience for the user, I > want to give them 7 smaller input forms, each one following the other > > what would be the correct way to do this, one very large, complex coded php > conditional form that does everything, or several smaller ones ?
one script to "run" the form with decent logic to break it up into a few sections... but that's makes reading/updating the script difficult, so I prefer to include() the HTML code for each form, and in some cases, eve include() the main programming for each "section"
> if I use one form, it will conatin rather a lot of code, but execution would > all be handled by the form itself > > but if I use multiple smaller forms, each form would need to process the > previous forms input, and then display it's inputs for entry > > I am also using sessions, which adds a little to complexity
actually, they help!! You can save the contents of form1 into the session before showing form2, then adding the contents of form2 before showing form3, etc etc. Much easier than setting cookies, writing hidden inputs on subsequent forms, etc etc.
> any general good coding practice tips/links would be helpful
Use $_GET variables to keep track of which part of the form you are upto, and what you are doing.
I'd suggest this is a lot clearer than reyling on $_POST['submit'] being true or anything else like that.
So, maybe you have a few status':
- status=showForm - status=validate
And for both modes, you would tell the script which form part to show/validate using a GET variable formPart (=1,=2, etc)
So when the script first loads, set a default of status=showForm and a formPart=1
<? session_start();
// $status if(isset($_GET['status'])) { $status = $_GET['status']; } else { $status = 'showForm'; }
// $formPart if(isset($_GET['formPart'])) { $formPart = $_GET['formPart']; } else { $formPart = 1; } ?>
Then BEFORE anything is sent to the browser, validating would usually take place, so that you can do any redirects or anything like that. The way I've set it up, is that each form part has it's own php script with some code to validate the form entry.
<? if($status == "validate") { // look for an include file which matches the current $formPart // and include it... haven't put in place an error checking $validateCodeFile = "inc/validateFormCode/{$formPart}.php"; if(file_exists($validateCodeFile)) { include($validateCodeFile); } } ?>
I'll show a sample of these include files later. The aim of MY include files is to return a var $validEntry of true or false... based on that, I can decide whether to add the form contents to the session / database, or whether I should show the form again, due to errors.
<? if($validEntry) { // either add form contents to session or to database // //
// redirect to status=showForm&formPart=[next] $next = $formPart + 1; header("Location: myscript.php?status=showForm&formPart={$next}"); } else { // show same form again with error message $message = "you screwed up"; header("Location: myscript.php?status=showForm&formPart={$formPart}&message={$message}"); } ?>
That (roughly) takes care of validating each form entry, keeping track of all the vars with sessions or adding to a DB, and passing people onto the next form part.
Then you'd want a few lines of HTML, then some code to show the right formPart's HTML code, and a few lines to clode off the HTML.
if($status = 'showForm') { ?> <html> <head><title>form</title></head> <body> <? $includeFormCode = "inc/forms/{$formPart}.php"; if(file_exists($includeFormCode)) { include($includeFormCode); } ?> </body> </html> <? } ?>
The secret is that we're using include files to make sure the form's code base isn't messy.
The whole script in one:
--- <? session_start();// $status if(isset($_GET['status'])) { $status = $_GET['status']; } else { $status = 'showForm'; }
// $formPart if(isset($_GET['formPart'])) { $formPart = $_GET['formPart']; } else { $formPart = 1; }
if($status == "validate") { // look for an include file which matches the current $formPart // and include it... haven't put in place an error checking $validateCodeFile = "inc/validateFormCode/{$formPart}.php"; if(file_exists($validateCodeFile)) { include($validateCodeFile); } if($validEntry) { // either add form contents to session or to database // // // redirect to status=showForm&formPart=[next] $next = $formPart + 1; header("Location: myscript.php?status=showForm&formPart={$next}"); } else { // show same form again with error message $message = "you screwed up"; header("Location: myscript.php?status=showForm&formPart={$formPart}&message={$message}"); }
}
if($status = 'showForm') { ?> <html> <head><title>form</title></head> <body> <? $includeFormCode = "inc/forms/{$formPart}.php"; if(file_exists($includeFormCode)) { include($includeFormCode); } ?> </body> </html> <? } ?> ---
As for the include files, you can do whatever you like. For a 3 part form, you'd have 6 include files -- 3 for validating code, and 3 for HTML code for each form. An example of a simple HTML file would be:
<? $script = $_SERVER['PHP_SELF']; ?> <form action="<?=$script?>?status=validate&formPart=<?=$formPart?>" method="POST"> Name: <input type='text' name="name" value="" maxlength="50" size="20"><br /> Shoe Size: <input type='text' name="shoesize" value="" maxlength="2" size="2"><br /> </form>
Then the validate script for this part would be:
<? $validEntry = 0; if( (!isset($_POST['name'])) OR (!isset($_POST['shoesize'])) ) { $validEntry = 0; } else { $validEntry = 1; } ?>
... this only makes sure they were both entered... I'm sure you'd want to do more, but I'm sick of typing :)
That's probably waaaay more than you wanted to think about, but once I started typing, I found it hard to stop :)
Good luck.
Justin
attached mail follows:
On 01/27/2003 09:20 PM, Scott wrote: > hi > > looking for some advice > > I have a site in progress. user to it have to enter a LOT of information (it > will contain a club directory) > > in order to try and make it a less unpleasant experience for the user, I > want to give them 7 smaller input forms, each one following the other > > what would be the correct way to do this, one very large, complex coded php > conditional form that does everything, or several smaller ones ? > > if I use one form, it will conatin rather a lot of code, but execution would > all be handled by the form itself > > but if I use multiple smaller forms, each form would need to process the > previous forms input, and then display it's inputs for entry > > I am also using sessions, which adds a little to complexity > > any general good coding practice tips/links would be helpful
If you mean a form split in multiple pages, you may want to try this class because it provides exactly that, either in sequential (Wizard) mode with |Next >|, |< Back|, |Finish >>| buttons, or in random access (tabbed pages) mode where you can go from any form page to any other with Edit, Update, Cancel buttons:
http://www.phpclasses.org/multipageforms
--Regards, Manuel Lemos
attached mail follows:
Hello,
I'm a recent convert from CGI/Perl and so am still getting my feet wet in PHP.
Here's my code: $filename = "http://www.myserver.com/include/sometext.txt"; $handle = fopen ($filename, "rb"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); echo $contents; exit;
The problem is nothing shows up, it's a blank browser window. I'm sure this is a stupid questions and very easily fixed.
Also, if the text file I'm trying to read is multi lined, shouldnt I be placing the contents into an array? or is that old cgi habits coming through?
Thanks, Roger
attached mail follows:
Hello,
The PHP manual page for filesize (http://www.php.net/manual/en/function.filesize.php) mentions that it will not work on remote files. fread will stop once n number of bytes are read or EOF is received so you could set this to the maximum file size (in bytes) that you want to download.
Jason
On Mon, 2003-01-27 at 16:27, Guru Geek wrote: > Hello, > > I'm a recent convert from CGI/Perl and so am still getting my feet wet > in PHP. > > Here's my code: > $filename = "http://www.myserver.com/include/sometext.txt"; > $handle = fopen ($filename, "rb"); > $contents = fread ($handle, filesize ($filename)); > fclose ($handle); > echo $contents; > exit; > > The problem is nothing shows up, it's a blank browser window. I'm sure > this is a stupid questions and very easily fixed. > > Also, if the text file I'm trying to read is multi lined, shouldnt I be > placing the contents into an array? or is that old cgi habits coming > through? > > Thanks, > Roger > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I could be wrong, but I'd guess that filesize fails for remote files.
If all you're doing is spitting out the text, why not use readfile()?
-philip
On Mon, 27 Jan 2003, Guru Geek wrote:
> Hello, > > I'm a recent convert from CGI/Perl and so am still getting my feet wet > in PHP. > > Here's my code: > $filename = "http://www.myserver.com/include/sometext.txt"; > $handle = fopen ($filename, "rb"); > $contents = fread ($handle, filesize ($filename)); > fclose ($handle); > echo $contents; > exit; > > The problem is nothing shows up, it's a blank browser window. I'm sure > this is a stupid questions and very easily fixed. > > Also, if the text file I'm trying to read is multi lined, shouldnt I be > placing the contents into an array? or is that old cgi habits coming > through? > > Thanks, > Roger > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
On Mon, 27 Jan 2003, Guru Geek wrote:
> Hello, > > I'm a recent convert from CGI/Perl and so am still getting my feet wet > in PHP. > > Here's my code: > $filename = "http://www.myserver.com/include/sometext.txt"; > $handle = fopen ($filename, "rb"); > $contents = fread ($handle, filesize ($filename)); [snip]
See: http://www.php.net/filesize
You cannot use it with urls. Also if you can help it, don't go through http like this. But anyway, see also: file(), fgets(), and include()
Regards, Philip
attached mail follows:
Hi all.
Last try -- I know there's a lot of noise in this group, but could someone please offer an opinion?
Is the following possible to work around, or is it a bug that I should be reporting?
I'm having issues uploading files whose names don't necessarily end with the correct extension, in particular plain text files which don't end in .txt. (Why they don't is complicated, and it's impractical to insist that they must.) The files are received, but altered -- they are prepended with garbage data which makes them difficult to deal with in an elegant automated way, which is the whole point.
No doubt this is a mime type issue, as the files are received as type "application/x-macbinary" when sent from OSX IE (its best guess, I suppose). Is there any way to force plain text, or raw data? All I want to happen is for the files to be uploaded completely unchanged.
Btw, this happens with PHP 4.2.3 on OSX (entropy.ch), and with the latest 4.3 on OpenBSD.
Thanks,
Alex
af
ax-im.com
attached mail follows:
> Last try -- I know there's a lot of noise in this group, but could someone > please offer an opinion? > > Is the following possible to work around, or is it a bug that I should be > reporting? > > I'm having issues uploading files whose names don't necessarily end with > the correct extension, in particular plain text files which don't end in > .txt. (Why they don't is complicated, and it's impractical to insist that > they must.) The files are received, but altered -- they are prepended > with garbage data which makes them difficult to deal with in an elegant > automated way, which is the whole point. > > No doubt this is a mime type issue, as the files are received as type > "application/x-macbinary" when sent from OSX IE (its best guess, I > suppose). Is there any way to force plain text, or raw data? All I want > to happen is for the files to be uploaded completely unchanged. > > Btw, this happens with PHP 4.2.3 on OSX (entropy.ch), and with the latest > 4.3 on OpenBSD.
Are you using Apache 2?
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/
attached mail follows:
I don't believe it -- it's another IE "feature"!! It doesn't happen in Netscape 7. Not completely sure, but I think the binary data is the mac-specific type/creator code which apparently IE feels the need to prepend. I thought I was safe now that I've dumped OS 9 entirely and moved everything to OS X, but I guess not.
Btw, I finally figured out a way of stripping the binary data with a regexp (after struggling for a while before discovering that fgets is not binary safe!), but still, it's a hack that I'd rather not have to use. Honestly, Microsoft is the bane of my existence. Every time it tries to "help", it gets it wrong.
Thanks to everyone for the suggestions. Sometimes the eyes blur and the mind freezes over at times like these, and it takes external input to get un-frozen.
Cheers...
Alex
af
ax-im.com
> Are you using Apache 2? > > ---John W. Holmes...
> > Last try -- I know there's a lot of noise in this group, but could someone > > please offer an opinion? > > > > Is the following possible to work around, or is it a bug that I should be > > reporting? > > > > I'm having issues uploading files whose names don't necessarily end with > > the correct extension, in particular plain text files which don't end in > > .txt. (Why they don't is complicated, and it's impractical to insist that > > they must.) The files are received, but altered -- they are prepended > > with garbage data which makes them difficult to deal with in an elegant > > automated way, which is the whole point. > > > > No doubt this is a mime type issue, as the files are received as type > > "application/x-macbinary" when sent from OSX IE (its best guess, I > > suppose). Is there any way to force plain text, or raw data? All I want > > to happen is for the files to be uploaded completely unchanged. > > > > Btw, this happens with PHP 4.2.3 on OSX (entropy.ch), and with the latest > > 4.3 on OpenBSD.
attached mail follows:
I have a number of field entries that I am trying to send through to the body of an email.
How can I format the mail() command to send these multiple fields.
EG $name, $address, $comments. All to go into the body of an email.
Cheers
attached mail follows:
Something like...
$body = "blah blah blah\n"; $body .= "Name = $name\n"; $body .= "Address = $address\n"; $body .= "Comments = $comments\n";
mail("someon
somewhere.com", "subject", $body);
would do it.
On Tue, 28 Jan 2003, Bruce Levick wrote:
> I have a number of field entries that I am trying to send through to the > body of an email. > > How can I format the mail() command to send these multiple fields. > > EG $name, $address, $comments. All to go into the body of an email. > > Cheers > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
Here's my code now:
$filename = "/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/include/text.txt"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); echo readfile($filename); exit;
now it displays the contents of the text.txt file. I originally had just /include/text.txt but it told me no such file existed. But once I added the root directory stuff in front of that, it works.
I'm having a similar problem getting smarty to run, it keeps telling me that it can't find index.tpl and now I think I know what the problem is...
Thanks to everyone!!!!
attached mail follows:
I have to write a swath of code to manage system-related stuff based on database content. Scripts will be run as root by cron, and determine what they have to do via user interaction and SQL lookups. Functions will include manipulation of system configuration files, legacy text file configs, and some signalling with posix_kill. On some of the machines in question, there won't even be an httpd installed, so I'd be building a php as a standalone binary, and running it with shell magic and a -q option. I've done this kind of stuff in the past in smaller environments, and it seems to work nicely.
I'm more comfortable writing stuff in PHP. I use PHP alot more, and I find the resultant code more readable and easier to maintain. Aside from Perl's ubiquity and the dubious advantage of future flexibility by using Perl's DBI interface to talk to different SQL servers (I'm using MySQL at the moment), are there any compelling reasons I should write system stuff in Perl rather than PHP?
Thanks.
-- Paul Chvostek <paulit.ca> Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/
attached mail follows:
If you like php better, i'd stick with it; however, for almost all of my un-web-related stuff, i use perl.
i'm pretty sure they would run at about the same speeds/efficency.
"Paul Chvostek" <paul+php
it.ca> wrote in message
news:20030127190921.A25117
mail.it.ca...
>
> I have to write a swath of code to manage system-related stuff based on
> database content. Scripts will be run as root by cron, and determine
> what they have to do via user interaction and SQL lookups. Functions
> will include manipulation of system configuration files, legacy text
> file configs, and some signalling with posix_kill. On some of the
> machines in question, there won't even be an httpd installed, so I'd be
> building a php as a standalone binary, and running it with shell magic
> and a -q option. I've done this kind of stuff in the past in smaller
> environments, and it seems to work nicely.
>
> I'm more comfortable writing stuff in PHP. I use PHP alot more, and I
> find the resultant code more readable and easier to maintain. Aside
> from Perl's ubiquity and the dubious advantage of future flexibility by
> using Perl's DBI interface to talk to different SQL servers (I'm using
> MySQL at the moment), are there any compelling reasons I should write
> system stuff in Perl rather than PHP?
>
> Thanks.
>
> --
> Paul Chvostek <paul
it.ca>
> Operations / Abuse / Whatever
> it.canada, hosting and development http://www.it.ca/
>
attached mail follows:
Unless you've got a compelling reason to switch to Perl, I wouldn't. I like Perl, but like you have used PHP a lot more often in the last couple of years.
Where I find it really nice is when my cron scripts need to use the same libraries as my web scripts...
-philip
On Mon, 27 Jan 2003, Paul Chvostek wrote:
>
> I have to write a swath of code to manage system-related stuff based on
> database content. Scripts will be run as root by cron, and determine
> what they have to do via user interaction and SQL lookups. Functions
> will include manipulation of system configuration files, legacy text
> file configs, and some signalling with posix_kill. On some of the
> machines in question, there won't even be an httpd installed, so I'd be
> building a php as a standalone binary, and running it with shell magic
> and a -q option. I've done this kind of stuff in the past in smaller
> environments, and it seems to work nicely.
>
> I'm more comfortable writing stuff in PHP. I use PHP alot more, and I
> find the resultant code more readable and easier to maintain. Aside
> from Perl's ubiquity and the dubious advantage of future flexibility by
> using Perl's DBI interface to talk to different SQL servers (I'm using
> MySQL at the moment), are there any compelling reasons I should write
> system stuff in Perl rather than PHP?
>
> Thanks.
>
> --
> Paul Chvostek <paul
it.ca>
> Operations / Abuse / Whatever
> it.canada, hosting and development http://www.it.ca/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
>I'm more comfortable writing stuff in PHP. I use PHP alot more, and I >find the resultant code more readable and easier to maintain. Aside >from Perl's ubiquity and the dubious advantage of future flexibility by >using Perl's DBI interface to talk to different SQL servers (I'm using >MySQL at the moment), are there any compelling reasons I should write >system stuff in Perl rather than PHP?
If you have complicated tasks there may be more Perl examples on the internet, and that would be a vote for Perl. But then again, i once tried to translate Perl to PHP and that was unexpectedly easy. Except for the crypt() function which turned out to be different.
attached mail follows:
Sorry, here is the code now ( I need a nap )
$filename ="/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/include/text.txt"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); echo $contents; exit;
Guru Geek wrote:
> Here's my code now: > > $filename = > "/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/include/text.txt"; > $handle = fopen ($filename, "r"); > $contents = fread ($handle, filesize ($filename)); > fclose ($handle); > echo readfile($filename); > exit; > > now it displays the contents of the text.txt file. I originally had just > /include/text.txt but it told me no such file existed. But once I added the > root directory stuff in front of that, it works. > > I'm having a similar problem getting smarty to run, it keeps telling me that > it can't find index.tpl and now I think I know what the problem is... > > Thanks to everyone!!!! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Mon, 27 Jan 2003, Guru Geek wrote:
> Sorry, here is the code now ( I need a nap ) > > $filename > ="/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/include/text.txt"; > $handle = fopen ($filename, "r"); > $contents = fread ($handle, filesize ($filename)); > fclose ($handle); > echo $contents; > exit;
For something like this, just use readfile() and not fread as it'd be much more efficient if you don't actually manipulate the string $contents. So:
readfile($filename); // note: do not use echo
Also, what is your include_path setting? It's important you know it and what it means as that'll answer the question in your last post:
print ini_get('include_path'); http://www.php.net/manual/configuration.directives.php#ini.include-path
Also, no need for "exit" here as that happens automatically.
Regards, Philip
attached mail follows:
In all actuality I will be manipulating the information that is in that file.
I'm trying to build a log in script. The id's and passwords are stored in a text file. I'm trying to read that text file so I can compare what the user/viewer had typed in the id and password boxes. I'm so new to PHP I'm taking it in baby steps...
Philip Olson wrote:
> On Mon, 27 Jan 2003, Guru Geek wrote: > > > Sorry, here is the code now ( I need a nap ) > > > > $filename > > ="/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/include/text.txt"; > > $handle = fopen ($filename, "r"); > > $contents = fread ($handle, filesize ($filename)); > > fclose ($handle); > > echo $contents; > > exit; > > For something like this, just use readfile() and not fread > as it'd be much more efficient if you don't actually manipulate > the string $contents. So: > > readfile($filename); // note: do not use echo > > Also, what is your include_path setting? It's important > you know it and what it means as that'll answer the > question in your last post: > > print ini_get('include_path'); > http://www.php.net/manual/configuration.directives.php#ini.include-path > > Also, no need for "exit" here as that happens automatically. > > Regards, > Philip
attached mail follows:
I dont know where this came from. The site was working fine, unless someone else on my team made a fix in this file.
Any thoughts on this error?
Warning: Cannot send session cache limiter - headers already sent (output started at /home/sisource/public_html/stage/administration/config.php:19) in /home/sisource/public_html/stage/administration/phpSecurePages/checklogin.php on line 134
_________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
attached mail follows:
----- Original Message -----
> From: "Didier McGillis" <codesmoker
hotmail.com>
> Sent: Monday, January 27, 2003 7:14 PM
> Subject: [PHP] HELP session cache limiters
>
> Any thoughts on this error?
>
> Warning: Cannot send session cache limiter - headers already sent (output
> started at /home/sisource/public_html/stage/administration/config.php:19)
in
What's happening at line 19 in /home/sisource/public_html/stage/administration/config.php?
attached mail follows:
Nevermind, I have found the person who fooled with the code and then lied about being in the file.
>From: "Matt" <mschroebel
epooch.com>
>To: "Didier McGillis" <codesmoker
hotmail.com>, <php-general
lists.php.net>
>Subject: Re: [PHP] HELP session cache limiters
>Date: Mon, 27 Jan 2003 19:48:31 -0500
>
>----- Original Message -----
> > From: "Didier McGillis" <codesmoker
hotmail.com>
> > Sent: Monday, January 27, 2003 7:14 PM
> > Subject: [PHP] HELP session cache limiters
> >
> > Any thoughts on this error?
> >
> > Warning: Cannot send session cache limiter - headers already sent
>(output
> > started at
>/home/sisource/public_html/stage/administration/config.php:19)
>in
>
>What's happening at line 19 in
>/home/sisource/public_html/stage/administration/config.php?
_________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
attached mail follows:
Hello,
I present some content of a mysql-table in an html-table. When the query which collects the content contains few rows I get the amount of space I want between the output and the above content. But when I get for instance 60 rows, the printed result jumps down about 7 lines. I would like to have the same small gap between the result of the query and the above content.
The code is as follows:
......snip.........
<table width="100%" cellpadding="0" class="alle"> <tr> <td> <strong><?php echo $row_Recordset1['mModell']; ?></strong> </td> <td align="right"> </td> </tr>
<tr> <td colspan="2"> <?php //checks if there exists any rows if($totalRows_Recordset1 > 0) { ?>
<table width="70%" border="0"> <tr> ..........around here the printed result jumps many rows down <td><strong>Kontonr.</strong></td> <td><strong>Delkontonr.</strong></td> <td><strong>Tekst</strong></td> <td><strong>Kostnad</strong></td> <td><strong>Enhet</strong></td> </tr> <tr><td colspan="5"></td></tr> <?php do { $kontonr = $row_Recordset1['mKontonr']; $delkontonr = $row_Recordset1['mDelkontonr']; if ($delkontonr == 0) { $strong = '<strong>'; $strong2 = '</strong>'; } else { $strong = ''; $strong2 = ''; } ?> <tr> <td><?php echo $strong . fjern_null($row_Recordset1['mHovedkonto']) . $strong2; ?></td> <td><?php echo $strong . $row_Recordset1['mDelkontonr'] . $strong2; ?></td> <td><?php echo $strong . $row_Recordset1['mKontotekst'] . $strong2; ?></td> <td><?php echo $strong . fjern_null($row_Recordset1['mKostnad']) . $strong2; ?></td> <td><?php echo $strong . $row_Recordset1['mEnhet'] . $strong2; ?></td> </tr> <!--<input name="modell" type="hidden" value="<?php //echo $modell; ?>">--> <input name="modellId" type="hidden" value="<?php echo $row_Recordset1['modellId']; ?>"> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> </table>
<?php } //if($totalRows_Recordset1 > 0) { ?> </td> </tr> </table>
...... and so on ............
When the query returns 60 rows I get ca. 7 blank lines between <?php echo $row_Recordset1['mModell']; ?> and Kontonr.
Does anyone understand? Anyone have a tip?
Thanks a lot!
Lars
attached mail follows:
Hi,
Tuesday, January 28, 2003, 12:24:21 PM, you wrote: LE> Hello,
LE> I present some content of a mysql-table in an html-table. When the query LE> which collects the content contains few rows I get the amount of space I LE> want between the output and the above content. But when I get for instance LE> 60 rows, the printed result jumps down about 7 lines. I would like to have LE> the same small gap between the result of the query and the above content.
LE> The code is as follows:
LE> ......snip.........
LE> <table width="100%" cellpadding="0" class="alle"> LE> <tr> LE> <td> <strong><?php echo $row_Recordset1['mModell']; ?></strong> LE> </td> LE> <td align="right"> </td> LE> </tr>
LE> <tr> LE> <td colspan="2"> LE> <?php LE> //checks if there exists any rows LE> if($totalRows_Recordset1 > 0) { LE> ?>
LE> <table width="70%" border="0"> LE> <tr> LE> ..........around here the printed result jumps many rows down LE> <td><strong>Kontonr.</strong></td> LE> <td><strong>Delkontonr.</strong></td> LE> <td><strong>Tekst</strong></td> LE> <td><strong>Kostnad</strong></td> LE> <td><strong>Enhet</strong></td> LE> </tr> LE> <tr><td colspan="5"></td></tr> LE> <?php do { LE> $kontonr = $row_Recordset1['mKontonr']; LE> $delkontonr = $row_Recordset1['mDelkontonr']; LE> if ($delkontonr == 0) { $strong = '<strong>'; $strong2 = LE> '</strong>'; } LE> else { $strong = ''; $strong2 = ''; } LE> ?> LE> <tr> LE> <td><?php echo $strong . LE> fjern_null($row_Recordset1['mHovedkonto']) . $strong2; ?></td> LE> <td><?php echo $strong . LE> $row_Recordset1['mDelkontonr'] . $strong2; ?></td> LE> <td><?php echo $strong . LE> $row_Recordset1['mKontotekst'] . $strong2; ?></td> LE> <td><?php echo $strong . LE> fjern_null($row_Recordset1['mKostnad']) . $strong2; ?></td> LE> <td><?php echo $strong . $row_Recordset1['mEnhet'] . $strong2; ?>></td> LE> </tr> LE> <!--<input name="modell" type="hidden" value="<?php //echo $modell; ?>>">--> LE> <input name="modellId" type="hidden" value="<?php echo LE> $row_Recordset1['modellId']; ?>"> LE> <?php } while ($row_Recordset1 = LE> mysql_fetch_assoc($Recordset1)); ?> LE> </table>
LE> <?php LE> } //if($totalRows_Recordset1 > 0) { LE> ?> LE> </td> LE> </tr> LE> </table>
LE> ...... and so on ............
LE> When the query returns 60 rows I get ca. 7 blank lines between <?php echo LE> $row_Recordset1['mModell']; ?> and Kontonr.
LE> Does anyone understand? Anyone have a tip?
LE> Thanks a lot!
LE> Lars
maybe this line needs changing <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> to: <?php }// while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
I think you need the comment
-- regards, Tom
attached mail follows:
You mean to comment out the while sentence? A do-while-loop won't work without the while-part would it? Comments are suplements to understand the code, not needed for the code to work.
Thanks anyway
"Tom Rogers" <trogers
kwikin.com> skrev i melding
news:5745208776.20030128123832
kwikin.com...
> Hi,
>
> Tuesday, January 28, 2003, 12:24:21 PM, you wrote:
> LE> Hello,
>
> LE> I present some content of a mysql-table in an html-table. When the
query
> LE> which collects the content contains few rows I get the amount of space
I
> LE> want between the output and the above content. But when I get for
instance
> LE> 60 rows, the printed result jumps down about 7 lines. I would like to
have
> LE> the same small gap between the result of the query and the above
content.
>
> LE> The code is as follows:
>
> LE> ......snip.........
>
> LE> <table width="100%" cellpadding="0" class="alle">
> LE> <tr>
> LE> <td> <strong><?php echo $row_Recordset1['mModell'];
?></strong>
> LE> </td>
> LE> <td align="right"> </td>
> LE> </tr>
>
> LE> <tr>
> LE> <td colspan="2">
> LE> <?php
> LE> //checks if there exists any rows
> LE> if($totalRows_Recordset1 > 0) {
> LE> ?>
>
> LE> <table width="70%" border="0">
> LE> <tr>
> LE> ..........around here the printed result jumps many rows down
> LE> <td><strong>Kontonr.</strong></td>
> LE> <td><strong>Delkontonr.</strong></td>
> LE> <td><strong>Tekst</strong></td>
> LE> <td><strong>Kostnad</strong></td>
> LE> <td><strong>Enhet</strong></td>
> LE> </tr>
> LE> <tr><td colspan="5"></td></tr>
> LE> <?php do {
> LE> $kontonr = $row_Recordset1['mKontonr'];
> LE> $delkontonr = $row_Recordset1['mDelkontonr'];
> LE> if ($delkontonr == 0) { $strong = '<strong>'; $strong2 =
> LE> '</strong>'; }
> LE> else { $strong = ''; $strong2 = ''; }
> LE> ?>
> LE> <tr>
> LE> <td><?php echo $strong .
> LE> fjern_null($row_Recordset1['mHovedkonto']) . $strong2; ?></td>
> LE> <td><?php echo $strong .
> LE> $row_Recordset1['mDelkontonr'] . $strong2; ?></td>
> LE> <td><?php echo $strong .
> LE> $row_Recordset1['mKontotekst'] . $strong2; ?></td>
> LE> <td><?php echo $strong .
> LE> fjern_null($row_Recordset1['mKostnad']) . $strong2; ?></td>
> LE> <td><?php echo $strong .
$row_Recordset1['mEnhet'] .
> $strong2; ?>></td>
> LE> </tr>
> LE> <!--<input name="modell" type="hidden"
value="<?php
> //echo $modell; ?>>">-->
> LE> <input name="modellId" type="hidden" value="<?php
echo
> LE> $row_Recordset1['modellId']; ?>">
> LE> <?php } while ($row_Recordset1 =
> LE> mysql_fetch_assoc($Recordset1)); ?>
> LE> </table>
>
>
>
> LE> <?php
> LE> } //if($totalRows_Recordset1 > 0) {
> LE> ?>
> LE> </td>
> LE> </tr>
> LE> </table>
>
> LE> ...... and so on ............
>
>
> LE> When the query returns 60 rows I get ca. 7 blank lines between <?php
echo
> LE> $row_Recordset1['mModell']; ?> and Kontonr.
>
> LE> Does anyone understand? Anyone have a tip?
>
> LE> Thanks a lot!
>
> LE> Lars
>
>
>
>
> maybe this line needs changing <?php } while ($row_Recordset1 =
mysql_fetch_assoc($Recordset1)); ?>
> to:
> <?php }// while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
>
> I think you need the comment
>
> --
> regards,
> Tom
>
attached mail follows:
[snip] > </tr> > <!--<input name="modell" type="hidden" value="<?php > //echo $modell; ?>">--> > <input name="modellId" type="hidden" value="<?php echo > $row_Recordset1['modellId']; ?>"> > <?php } while ($row_Recordset1 = > mysql_fetch_assoc($Recordset1)); ?> > </table>
Your problem is probably right here. Why do you have output between the </tr> and </table> tag? Since that doesn't make sense, there shouldn't be any data there, it's now up to your browser to decide where to place it. Most browsers will bunch it all together before or after the table. So place your commented out <input> tag inside or outside of your table.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/
attached mail follows:
Hi,
Tuesday, January 28, 2003, 12:47:05 PM, you wrote: LE> You mean to comment out the while sentence? LE> A do-while-loop won't work without the while-part would it? Comments are LE> suplements to understand the code, not needed for the code to work.
LE> Thanks anyway
LE> "Tom Rogers" <trogers
kwikin.com> skrev i melding
LE> news:5745208776.20030128123832
kwikin.com...
>> Hi,
>>
>> Tuesday, January 28, 2003, 12:24:21 PM, you wrote:
>> LE> Hello,
>>
>> LE> I present some content of a mysql-table in an html-table. When the
LE> query
>> LE> which collects the content contains few rows I get the amount of space
LE> I
>> LE> want between the output and the above content. But when I get for
LE> instance
>> LE> 60 rows, the printed result jumps down about 7 lines. I would like to
LE> have
>> LE> the same small gap between the result of the query and the above
LE> content.
>>
>> LE> The code is as follows:
>>
>> LE> ......snip.........
>>
>> LE> <table width="100%" cellpadding="0" class="alle">
>> LE> <tr>
>> LE> <td> <strong><?php echo $row_Recordset1['mModell'];
?>></strong>
>> LE> </td>
>> LE> <td align="right"> </td>
>> LE> </tr>
>>
>> LE> <tr>
>> LE> <td colspan="2">
>> LE> <?php
>> LE> //checks if there exists any rows
>> LE> if($totalRows_Recordset1 > 0) {
>> LE> ?>
>>
>> LE> <table width="70%" border="0">
>> LE> <tr>
>> LE> ..........around here the printed result jumps many rows down
>> LE> <td><strong>Kontonr.</strong></td>
>> LE> <td><strong>Delkontonr.</strong></td>
>> LE> <td><strong>Tekst</strong></td>
>> LE> <td><strong>Kostnad</strong></td>
>> LE> <td><strong>Enhet</strong></td>
>> LE> </tr>
>> LE> <tr><td colspan="5"></td></tr>
>> LE> <?php do {
>> LE> $kontonr = $row_Recordset1['mKontonr'];
>> LE> $delkontonr = $row_Recordset1['mDelkontonr'];
>> LE> if ($delkontonr == 0) { $strong = '<strong>'; $strong2 =
>> LE> '</strong>'; }
>> LE> else { $strong = ''; $strong2 = ''; }
>> LE> ?>
>> LE> <tr>
>> LE> <td><?php echo $strong .
>> LE> fjern_null($row_Recordset1['mHovedkonto']) . $strong2; ?></td>
>> LE> <td><?php echo $strong .
>> LE> $row_Recordset1['mDelkontonr'] . $strong2; ?></td>
>> LE> <td><?php echo $strong .
>> LE> $row_Recordset1['mKontotekst'] . $strong2; ?></td>
>> LE> <td><?php echo $strong .
>> LE> fjern_null($row_Recordset1['mKostnad']) . $strong2; ?></td>
>> LE> <td><?php echo $strong .
LE> $row_Recordset1['mEnhet'] .
>> $strong2; ?>></td>
>> LE> </tr>
>> LE> <!--<input name="modell" type="hidden"
LE> value="<?php
>> //echo $modell; ?>>">-->
>> LE> <input name="modellId" type="hidden" value="<?php
LE> echo
>> LE> $row_Recordset1['modellId']; ?>">
>> LE> <?php } while ($row_Recordset1 =
>> LE> mysql_fetch_assoc($Recordset1)); ?>
>> LE> </table>
>>
>>
>>
>> LE> <?php
>> LE> } //if($totalRows_Recordset1 > 0) {
>> LE> ?>
>> LE> </td>
>> LE> </tr>
>> LE> </table>
>>
>> LE> ...... and so on ............
>>
>>
>> LE> When the query returns 60 rows I get ca. 7 blank lines between <?php
LE> echo
>> LE> $row_Recordset1['mModell']; ?> and Kontonr.
>>
>> LE> Does anyone understand? Anyone have a tip?
>>
>> LE> Thanks a lot!
>>
>> LE> Lars
>>
>>
>>
>>
>> maybe this line needs changing <?php } while ($row_Recordset1 =
LE> mysql_fetch_assoc($Recordset1)); ?>
>> to:
>> <?php }// while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
>>
>> I think you need the comment
>>
>> --
>> regards,
>> Tom
>>
True :) I missed the do bit , doing it that way means it will print out empty values for the first run. You should make it a normal while loop or at least fetch the first row before hitting the loop.
-- regards, Tom
attached mail follows:
$HTTP_SESSION_VARS and $_SESSION don't magically update when you add a session variable with session_register().
Jed R. Brubaker wrote:
>I have a quirky problem that should be a breeze for someone who is smarter >than I. > >I have a script where I am registering a HTML form post variable as a >session variable and then echo it. In the real script I use it in a MySQL >query, but for the sake of this post, here is the "script": > >$user1 = $HTTP_POST_VARS["user1"]; >session_register("user1"); >echo $HTTP_SESSION_VARS["user1"]; > >This doesn't work, however, if I hit the refresh button the var miraculously >appears! >What am I doing wrong? > > > > >
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
attached mail follows:
I know how to load extensions if they are not included in PHP.ini (dl function), but how do I gain access to PEAR?
I can see the directory /apache/php/pear/ on my test machine, but when I try to reference via
include_once("DB.php");
not found on include list error,,,,, can I dynamically change include list, and what kind of security hole would that represent? my test machine is windows, and my production machine is Redhat Linux, so I need to find a way to gain access to pear in both environments.
Warren Vail
warren
vailtech.net
attached mail follows:
You could download the pear files from the pear CVS to somewhere within your programs path. If your web files are in (using a linux example) /home/foo/public_html then just change to that directory and checkout the files from CVS. This also gives you the luxury of keeping the pear files uptodate yourself (cd pear; cvs update). Information on getting pear from the CVS can be found here http://www.onlamp.com/lpt/a/882 (scroll down).
Another option would be to keep everything they way it is and use a full path to the include files. You can set the include path in a main settings file somewhere:
define('DIR_PEAR', '/apache/php/pear'); include(DIR_PEAR . 'DB.php');
Of course you would need to have the settings file included in all your scripts (but this is a common thing for larger apps).
If you want it to dynamically switch depending on windows or linux, using full paths, you could try something like (taken from pear DB, if I remember right - using a shared settings file as well): // try windows define('ROOT_PATH_DELIMITER', 'C:');
define('SMART_PATH_DELIMITER', (substr(PHP_OS, 0, 3) == 'WIN') ? '\\' : '/' ); define('DIR_PEAR', ROOT_PATH_DELIMITER . SMART_PATH_DELIMITER . 'apache' . SMART_PATH_DELIMITER . 'php' . SMART_PATH_DELIMITER . 'pear'); include(DIR_PEAR . SMART_PATH_DELIMITER . 'DB.php');
Then the only thing you have to change from windows to linux is the ROOT_PATH_DELIMITER (comment it out). I did this quickly so not sure if it works. Play around - I'm sure you will find something you can work with.
OR you can manually set your include path at the start of your app:
ini_set('include_path', '.:..:../..:/apache/php/pear'); // searches through ./foo.inc, ../foo.inc, ../../foo.inc, /apache/php/pear/foo.inc
good luck
Quoting Warren Vail <warren
vailtech.net>:
>
> I know how to load extensions if they are not included in PHP.ini (dl
> function), but how do I gain access to PEAR?
>
> I can see the directory /apache/php/pear/ on my test machine, but when I try
> to reference via
>
> include_once("DB.php");
>
> not found on include list error,,,,, can I dynamically change include list,
> and what kind of security hole would that represent? my test machine is
> windows, and my production machine is Redhat Linux, so I need to find a way
> to gain access to pear in both environments.
>
> Warren Vail
> warren
vailtech.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
> Then the only thing you have to change from windows to linux is the > ROOT_PATH_DELIMITER (comment it out).
I meant to say remove the value: define('ROOT_PATH_DELIMITER', '');
Quoting jacob
keystreams.com:
> You could download the pear files from the pear CVS to somewhere within your
>
> programs path. If your web files are in (using a linux
> example) /home/foo/public_html then just change to that directory and
> checkout
> the files from CVS. This also gives you the luxury of keeping the pear files
>
> uptodate yourself (cd pear; cvs update). Information on getting pear from the
>
> CVS can be found here http://www.onlamp.com/lpt/a/882 (scroll down).
>
> Another option would be to keep everything they way it is and use a full path
>
> to the include files. You can set the include path in a main settings file
> somewhere:
>
> define('DIR_PEAR', '/apache/php/pear');
> include(DIR_PEAR . 'DB.php');
>
> Of course you would need to have the settings file included in all your
> scripts (but this is a common thing for larger apps).
>
> If you want it to dynamically switch depending on windows or linux, using
> full
> paths, you could try something like (taken from pear DB, if I remember right
> -
> using a shared settings file as well):
> // try windows
> define('ROOT_PATH_DELIMITER', 'C:');
>
> define('SMART_PATH_DELIMITER', (substr(PHP_OS, 0, 3) == 'WIN') ? '\\' : '/'
> );
> define('DIR_PEAR', ROOT_PATH_DELIMITER . SMART_PATH_DELIMITER . 'apache' .
> SMART_PATH_DELIMITER . 'php' . SMART_PATH_DELIMITER . 'pear');
> include(DIR_PEAR . SMART_PATH_DELIMITER . 'DB.php');
>
> Then the only thing you have to change from windows to linux is the
> ROOT_PATH_DELIMITER (comment it out). I did this quickly so not sure if it
> works. Play around - I'm sure you will find something you can work with.
>
> OR you can manually set your include path at the start of your app:
>
> ini_set('include_path', '.:..:../..:/apache/php/pear'); // searches
> through ./foo.inc, ../foo.inc, ../../foo.inc, /apache/php/pear/foo.inc
>
> good luck
>
> Quoting Warren Vail <warren
vailtech.net>:
>
> >
> > I know how to load extensions if they are not included in PHP.ini (dl
> > function), but how do I gain access to PEAR?
> >
> > I can see the directory /apache/php/pear/ on my test machine, but when I
> try
> > to reference via
> >
> > include_once("DB.php");
> >
> > not found on include list error,,,,, can I dynamically change include
> list,
> > and what kind of security hole would that represent? my test machine is
> > windows, and my production machine is Redhat Linux, so I need to find a
> way
> > to gain access to pear in both environments.
> >
> > Warren Vail
> > warren
vailtech.net
> >
> >
> >
> > --
> > 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
>
>
attached mail follows:
Hi All,
How to convert HTML Table structure to DB schema or XML format Here is the sample table
Looking for your commnets / directions (Note: I dont know about regular expressions much :( )
Regards Tariq
<table width="83%" border="1" cellpadding="2" cellspacing="0" > <tr> <td colspan="8" height="25"> <b> <a href=http://www.ababasons.com
>A. BABA & SONS</a></b> </td> <tr> <td colspan="8" align="left" valign="top"> <p>240/2, SECTOR 6.1, Lahore.<br> [LAHORE ] </p></td> <tr> <td><b>Phone:</b></td> <td>92021-6974878</td> <td><b>Mobile:</b></td> <td colspan="3">0333-66566 </td> <td><b>Fax:</b></td> <td colspan="3">92021-6901145</td> </tr> <tr> <td colspan="8" height="25"> <b> <a href=http://www.ababasons.com
>ABC & CO</a></b> </td>
<tr> <td colspan="8" align="left" valign="top"> <p>240/2, SECTOR 6.1, NORTH KARACHI, KARACHI.<br> [KARACHI ] </p></td> <tr> <td><b>Phone:</b></td> <td>92021-6974878</td> <td><b>Mobile:</b></td> <td colspan="3">033-565659</td> <td><b>Fax:</b></td> <td colspan="3">92021-6118625 </td> </tr> <tr> <td colspan="8" height="25"> <b> <a href=http://www.ababasons.com
>ARahat Textile</a></b> </td>
<tr> <td colspan="8" align="left" valign="top"> <p>240/2, SECTOR 6.1, NORTH KARACHI, KARACHI.<br> [KARACHI ] </p></td> <tr> <td><b>Phone:</b></td> <td>92021-6974878</td> <td><b>Mobile:</b></td> <td colspan="3"> </td> <td><b>Fax:</b></td> <td colspan="3">92021-6966625 </td> </tr> <tr> <td colspan="8" height="25"> <b> <a href=http://www.ababasons.com
>A. Corvid Ltd</a></b> </td>
<tr> <td colspan="8" align="left" valign="top"> <p>240/2, SECTOR 6.1, NORTH Peshawar<br> [PESHAWAR ] </p></td> <tr> <td width="7%"><b>Phone:</b></td> <td width="26%">92021-6974878</td> <td width="8%"><b>Mobile:</b></td> <td colspan="3">0332-656656 </td> <td width="5%"><b>Fax:</b></td> <td width="33%" colspan="3">92021-69086265</td> </tr> </table>
attached mail follows:
I have a PHP page with a form that submits to another PHP processing page. On completion of the PHP actions on the processing page, I have echoed into the page the javascript action of 'location.href=...' and the location is redirected to the PHP form page that starting the process. Both pages take data from an SQL server. The problem I'm having is that the the javascript always grabs the cached page. I need a newly refreshed page to return with updated data from the SQL server. Any suggestions?
attached mail follows:
> I have a PHP page with a form that submits to another PHP processing page. > On completion of the PHP actions on the processing page, I have echoed > into > the page the javascript action of 'location.href=...' and the location is > redirected to the PHP form page that starting the process. Both pages take > data from an SQL server. The problem I'm having is that the the javascript > always grabs the cached page. I need a newly refreshed page to return with > updated data from the SQL server. Any suggestions?
You may be able to use the header() function to send headers telling the browser not to cache the page. Take a look at the header() manual page and there is an example (6th gray box).
www.php.net/header
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/
attached mail follows:
on 28/01/03 4:42 PM, Phil (philcava
attbi.com) wrote:
> I have a PHP page with a form that submits to another PHP processing page. > On completion of the PHP actions on the processing page, I have echoed into > the page the javascript action of 'location.href=...' and the location is > redirected to the PHP form page that starting the process. Both pages take > data from an SQL server. The problem I'm having is that the the javascript > always grabs the cached page. I need a newly refreshed page to return with > updated data from the SQL server. Any suggestions?
In addition to sending the correct no-cache headers (which don't always work with certain browsers and clients), you could also attach a random string to the URL as a GET variable, so that the browser thinks it's a NEW, unread URL.
include this function (straight from the manual) via a function library: <? function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } ?>
Then to get a random number,
<? // seed the rand no generator and get a rand value srand(make_seed()); $randval = rand(); ?>
Then you can echo it as a get var or querystring on any URL:
location.href = page.php?r=<?=$randval?> location.href = page.php?<?=$randval?>
Justin
attached mail follows:
Hello everyone,
I want to be able to use objects to create my future pages. My goal is to use methods of classes to make the original front-line script easier to read, while all the processing is done with a simple call to the different classes from a single class. Please read futher, as I'll get to a point and to my question...
I have many classes that do different tasks, like formValidator.class, stringManipulator.class, db.class, fileManipulation.class, template.class, etc (these are self-explanitory as their names suggest). Then, I might have a class called category.class that adds, deletes, edits, moves, and renames categories within the filesystem and database. But I would have a front-line script called category.php that would call the necessary methods of category.class at certain points, depending on the task being done on a specific step.
In other words I want category.class to call the other classes and do something with them, then in turn I want category.php to call objects in category.class for a specific task, such as:
<?php
// category.php
include ("category.class"); $cat = new category (); $cat->addCategory($new_cat_name); // or $cat->editCategory($cat_name); // or $cat->deleteCategory($cat_name); // or $cat->moveCategory($cat_name); // or $cat->renameCategory($cat_name);
?>
My question is:
How can I call a class within another class and do something with it? Right now I'm doing it the most convenient way I know, which is including other classes using the include() function within the methods of the category.class. There is no multiple-inheritance allowed in PHP, so I can only use inheritance on one class.
I am also extremely skeptical about creating too many classes at a time in one script. Do the above examples degrade performance speed of the script when I call too many classes? Also, isn't there a way to use sessions to save created classes and then use them again for other scripts without the need to make a new instance of the same class again and again?
I am really looking for a better way to organize my code while still being able to use these classes whenever I need them and at the same time keeping the category.php file clean and easy to read. Is there a tutorial on how to organize code? I'm not looking for html template tutorials. Just how to get around inheritance limits while still keeping performance and clean-code in mind.
Here's an example of what category.class might look like:
<?php
// category.class include ("base_db.class"); class category extends base_db {
function addCategory { include ("fileManipulation.class"); include ("formValidator.class"); include ("stringManipulator.class");
// Manipulate Inputted Category String $strMan = new stringManipulator(); $strMan->formatCat($new_cat_name);
// Validate Form Values $formVal = new formValidator(); $formVal->addCatVal($new_cat_name);
// Add A Folder To Hold Category Files $file = new fileManipulator(); $file->createFolder($cat_path.$cat_dir);
// And so on... } }
attached mail follows:
Hi All Guru's here,
I need your help regarding converting HTML Table structure to DB schema or XML format. I am not a Regular expression expert.
(Actually i have 500 html files containing this table struction,and need to read all 500 files and convert them to DB schema or XML format)
Looking for anybody to help me out. Regards Tariq
<table width="83%" border="1" cellpadding="2" cellspacing="0" > <tr> <td colspan="8" height="25"> <b> <a href=http://www.ababasons.com
>A. BABA & SONS</a></b> </td> <tr> <td colspan="8" align="left" valign="top"> <p>240/2, SECTOR 6.1, Lahore.<br> [LAHORE ] </p></td> <tr> <td><b>Phone:</b></td> <td>92021-6974878</td> <td><b>Mobile:</b></td> <td colspan="3">0333-66566 </td> <td><b>Fax:</b></td> <td colspan="3">92021-6901145</td> </tr> <tr> <td colspan="8" height="25"> <b> <a href=http://www.ababasons.com
>ABC & CO</a></b> </td>
<tr> <td colspan="8" align="left" valign="top"> <p>240/2, SECTOR 6.1, NORTH KARACHI, KARACHI.<br> [KARACHI ] </p></td> <tr> <td><b>Phone:</b></td> <td>92021-6974878</td> <td><b>Mobile:</b></td> <td colspan="3">033-565659</td> <td><b>Fax:</b></td> <td colspan="3">92021-6118625 </td> </tr> <tr> <td colspan="8" height="25"> <b> <a href=http://www.ababasons.com
>ARahat Textile</a></b> </td>
<tr> <td colspan="8" align="left" valign="top"> <p>240/2, SECTOR 6.1, NORTH KARACHI, KARACHI.<br> [KARACHI ] </p></td> <tr> <td><b>Phone:</b></td> <td>92021-6974878</td> <td><b>Mobile:</b></td> <td colspan="3"> </td> <td><b>Fax:</b></td> <td colspan="3">92021-6966625 </td> </tr> <tr> <td colspan="8" height="25"> <b> <a href=http://www.ababasons.com
>A. Corvid Ltd</a></b> </td>
<tr> <td colspan="8" align="left" valign="top"> <p>240/2, SECTOR 6.1, NORTH Peshawar<br> [PESHAWAR ] </p></td> <tr> <td width="7%"><b>Phone:</b></td> <td width="26%">92021-6974878</td> <td width="8%"><b>Mobile:</b></td> <td colspan="3">0332-656656 </td> <td width="5%"><b>Fax:</b></td> <td width="33%" colspan="3">92021-69086265</td> </tr> </table>
-- Tariq Murtaza Assistant Web Master Business Technology Team Small & Medium Enterprise Development Authority-- Tariq Murtaza Assistant Web Master Business Technology Team Small & Medium Enterprise Development Authority
attached mail follows:
At 07:52 28-1-03, you wrote: >Hi All Guru's here,
Sorry, i am not a guru. I do have visions to become the enigmatic leader of a sekte but i think that's slightly out of scope here.
>(Actually i have 500 html files containing this table struction,and need >to read all 500 files and convert them to DB schema or XML format)
I had to do something similar. Unfortunately that code is not very readable. Maybe you can find something readable in a script library, look for 'html page ripper' or 'ripping an html page'.
What i did was i first cleaned up all HTML files in one sweep with the Search and Replace in Multiple Files option of UltraEdit. This to remove the head section which would bother me, and to remove newlines and tabs and double spaces.
Then i selected the keywords (or key sentences) that came back in all files that would announce the coming of a new data element. In your case they are easy to distinguish: add the <b> tag to the search sequence. In my files the keywords where luckily very unique. I made an array of these keywords. I think i did this: $array['name']['key']='<b>Name</b>';
Then i read in the files one by one, and with each file content i would go through the content. I would look for the start of every keyword or sentence (strpos) and find the end of it by looking for the next </td> tag. This value i would clean up and then add as value to the array. Maybe $array['name']['value']=trim($result);
From this array it was easy to build a query.
Next file.
attached mail follows:
Hey,
Is there a way in php to print to a printer? say i have a order from , when someone clicks the submit button - then print the form plus the entered details to a page ?
Thanks for you help
Shaun
-- Novtel Consulting Tel: +27 21 9822373 Fax: +27 21 9815846 Please visit our website: www.novtel.co.za
attached mail follows:
> Is there a way in php to print to a printer? say i have a order from , > when > someone clicks the submit button - then print the form plus the entered > details to a page ?
No, that's handled client side. PHP is server side. Use Javascript or the like...
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/
attached mail follows:
Yes. You'd better hope your server has a printer, though! :-) Seriousley though, PHP runs on the server. By the time the viewer sees it, it's already executed. Which means it can't do anything to the client's machine. Look into some client-side scripting.
Shaun van den Berg wrote:
>Hey, > >Is there a way in php to print to a printer? say i have a order from , when >someone clicks the submit button - then print the form plus the entered >details to a page ? > >Thanks for you help > >Shaun > >-- >Novtel Consulting >Tel: +27 21 9822373 >Fax: +27 21 9815846 >Please visit our website: >www.novtel.co.za > > > > >
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
attached mail follows:
On Tue, Jan 28, 2003 at 09:38:09AM +0200, Shaun van den Berg wrote: > > Is there a way in php to print to a printer? say i have a order from , when > someone clicks the submit button - then print the form plus the entered > details to a page ?
Are you talking about having a submit button that launches a browser's print dialog, as if the user pressed the print button in their browser, or do you want a user's form submission to cause a printer on (or near) your web server to spit out something based on the form contents?
I've build scripts that print to a server-side printer by creating output using pdflib, then submitting the PDF to the local (unix-based) lpr system. Then the only complexity is getting lpr to deal with PDF files (along with solutions to the security issues that surround giving your web server process the ability to submit print jobs). I do this for requests for paper invoices which fit inside window envelopes, so any invoices that turn up on the printer just get stuffed and mailed. I also do something similar for requests for FAXed quotes. The software builds a PDF, then submits it to Hylefax's sendfax program, which dumps it to a fax server elsewhere on the network.
If you're doing this in a Microsoft environment, I have no clue how you'd even approach the problem, let alone solve it.
-- Paul Chvostek <paulit.ca> Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/
attached mail follows:
Hello !
I write extension for PHP. I create bibliothek for Windows and for Linux. I set switch ZTS for thread-safety in Windows and use project php4ts. How can I set thread-safety for Linux? Help!!
Thank you at advance
Olga
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]