php-general Digest 6 Jun 2003 14:26:46 -0000 Issue 2101
Topics (messages 150443 through 150495):
Re: Php handling apache's error directive?
150443 by: Miranda, Joel Louie M
Re: Heredoc question
150444 by: Joel Rees
150488 by: Sparky Kopetzky
delete lines from text file
150445 by: Matt Palermo
150446 by: Martin Towell
150447 by: R'twick Niceorgaw
150451 by: Hugh Danaher
150452 by: Hugh Danaher
using a for loop but it is not working how come
150448 by: Richard Kurth
150449 by: Martin Towell
150456 by: Monty
Re: Administration packages
150450 by: olinux
150460 by: Boaz Yahav
PHP - File Edit
150453 by: Matt Zur
150454 by: Philip Olson
150455 by: \[cz\]Emo
150458 by: Boaz Yahav
Re: How do I display new lines in a textearea?
150457 by: Petre Agenbag
how is this done: shirtcity.com
150459 by: humme-online.de
PHP + MySQL Free Shopping Cart
150461 by: Miranda, Joel Louie M
150471 by: electroteque
Re: PHP CLI question
150462 by: Marek Kilimajer
Re: php4isapi.dll and header("Location: ...")
150463 by: Eric Tonicello
Creating alphabetical index links
150464 by: Awlad Hussain
150473 by: Armand Turpel
150474 by: DvDmanDT
[FYI] phpbooks.com
150465 by: Mark Owen
150466 by: Awlad Hussain
150479 by: John W. Holmes
150480 by: Mark Owen
150486 by: Ryan A
150487 by: Mark Owen
150494 by: Ryan A
Re: Using the .htaccess file to extend the php.ini include path entry
150467 by: Ford, Mike [LSS]
Re: PHP/Javascript Help
150468 by: Ford, Mike [LSS]
Re: move_uploaded_file > 1MB
150469 by: Ford, Mike [LSS]
How easy is this idea?
150470 by: Simon Thurtle
150472 by: DvDmanDT
150481 by: Iñaki Atienza
150489 by: Luis Lebron
Help - imap to file
150475 by: Alper SARI
Array
150476 by: Awlad Hussain
150477 by: electroteque
$PHP_AUTH_USER question...
150478 by: Tristan.Pretty.risk.sungard.com
$mc=new myclass(); or $mc= &new myclass(); ?
150482 by: Peter Misun
urldecode problem :(
150483 by: Rosen
150491 by: Seairth Jacobs
Re: Automatic Headers and Footers
150484 by: Jay Blanchard
Re: Initialized PHP Module frequently
150485 by: andre.lagadec.education.gouv.fr
Re: Trouble with fopen() || Win2k Machine
150490 by: Ptker
PGP?
150492 by: Ben Cheng
Netbilling Gateway
150493 by: Ralph
Help on showing results on screen
150495 by: Gloria L. McMillan
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]
----------------------------------------------------------------------
--- Begin Message ---
Its working, thanks!
http://lightning.prohosting.com/~relsom/variables.shtml
--
Louie
-----Original Message-----
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 10:07 AM
To: Miranda, Joel Louie M
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Php handling apache's error directive?
$_SERVER['REQUEST_URI']
Miranda, Joel Louie M wrote:
>Can I use php to be apache's error directive?
>I mean, im trying to change apache's error directive
>But at the same time I can only change the page and couldn't see what
>error it was, I can send it only to a page with an error saying 404,
>etc but I can't add what file did he type in the url.
>
>Any suggestions? Or docs will be good.
>
>Thanks,
>Louie
>
>
>
--
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
> That's fine for that but I have several places that use if's and else's...
AFAIK, you can't do conditionals inside a here doc. But then you don't
have to build your entire output string in one here doc, either.
Hmm. Maybe you're trying to build templates?
--
Joel Rees <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
I did figure a way around heredoc last night. Here's the solution if anyone
can use it:
<?php
$truth = true;
$head = "brain bucket";
$message = <<<TEST
This is a test of the emergency broadcasting system.
If this had been an actual emergency, you would have
been instructed to
TEST;
if ($truth)
{
$message .= " place your {$head} between your legs and\n";
}
$message .= <<<TEST
read from the chapters of Matthew, Mark, Luke
and DUCK!!
TEST;
print $message;
?>
$message is actually works in heredoc just like any other string. Didn't
expect that.
Hope this helps someone else who is trying the same thing as I am.
Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net
----- Original Message -----
From: "Jennifer Goodie" <[EMAIL PROTECTED]>
To: "Sparky Kopetzky" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Thursday, June 05, 2003 16:47
Subject: RE: [PHP] Heredoc question
> > Can one use <?php ?> within the heredoc syntax or is there
> > another way?? I'm trying to dynamically generate email from
> > generic text but with obvious additions, like this:
>
> http://us4.php.net/types.string says that heredoc acts just like double
> quoted, which would mean it expands variables, so I would try just
throwing
> them in there like this...
>
>
> $message = <<<my_message
> Name: {$lot->get_name()}
>
> Lot {$lot->get_id()} has been approved. Here is the
> link to the lot:
> my_message;
>
>
> There's an example of almost exactly like this on that page.
>
>
>
>
>
>
--- End Message ---
--- Begin Message ---
Can anyone help me figure out how to search for a string in a text file,
then delete the whole line of text that it occurs in?
For example: I have a text file which contains the following.
//****** text.txt ******
Keep this line.
Also keep this line.
Delete this line.
Keep this one too.
Now I want to do a search on this text file for the word "delete" and if
it finds that word, it will delete the whole line it occurs on. So
after this, the text file will look like this one:
//****** text.txt ******
Keep this line.
Also keep this line.
Keep this one too.
Can anyone help me with this? Thanks.
Matt
--- End Message ---
--- Begin Message ---
I think you'll have to read the file manually (file() would prob be the best
bet) and manually find/delete the line and then rewrite the file.
Martin
-----Original Message-----
From: Matt Palermo [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 1:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] delete lines from text file
Can anyone help me figure out how to search for a string in a text file,
then delete the whole line of text that it occurs in?
For example: I have a text file which contains the following.
//****** text.txt ******
Keep this line.
Also keep this line.
Delete this line.
Keep this one too.
Now I want to do a search on this text file for the word "delete" and if
it finds that word, it will delete the whole line it occurs on. So
after this, the text file will look like this one:
//****** text.txt ******
Keep this line.
Also keep this line.
Keep this one too.
Can anyone help me with this? Thanks.
Matt
--- End Message ---
--- Begin Message ---
On Thursday 05 June 2003 11:53 pm, Matt Palermo wrote:
> Can anyone help me figure out how to search for a string in a text file,
> then delete the whole line of text that it occurs in?
>
> For example: I have a text file which contains the following.
>
> //****** text.txt ******
> Keep this line.
> Also keep this line.
> Delete this line.
> Keep this one too.
>
>
> Now I want to do a search on this text file for the word "delete" and if
> it finds that word, it will delete the whole line it occurs on. So
> after this, the text file will look like this one:
>
> //****** text.txt ******
> Keep this line.
> Also keep this line.
> Keep this one too.
>
> Can anyone help me with this? Thanks.
>
> Matt
I think there's a better way to do it but here's whaqt I think
$f=file($file_name);
$new_file_data=Array();
$match_string="delete";
while (list($k,$v)=each($f)) {
if ( !strstr($match_string,$v))
$new_file_data[count($new_file_data)] = $v;
}
$fd=fopen($file_name,"w");
while (list($k,$v)=each($new_file_data)) {
fwrite($fd,$v);
}
HTH
--- End Message ---
--- Begin Message ---
Matt,
Try something like:
<?
$fp=fopen("file_name.txt","r");
while (feof($fp))
{
$line=fget($fp,100); // grabs text to end of line or 100 characters
whichever comes first
if (!preg_match("/delete/",$line))
{
$new_line.=$line;
}
}
fclose($fp);
$fp=fopen("file_name.txt","w");
fwrite($fp,$new_line) or die ("something died in here");
fclose($fp);
?>
I didn't check this before posting so there could be some syntax issues, but
the flow is what you need. Open a file for reading, read it line by line to
find a text phrase, accumulate the lines (less the one with the phrase) in a
new variable, close the file, open it again for writing, write the text to
the file, and then close it.
Hope this helps,
Hugh
----- Original Message -----
From: "Matt Palermo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 05, 2003 8:53 PM
Subject: [PHP] delete lines from text file
> Can anyone help me figure out how to search for a string in a text file,
> then delete the whole line of text that it occurs in?
>
> For example: I have a text file which contains the following.
>
> //****** text.txt ******
> Keep this line.
> Also keep this line.
> Delete this line.
> Keep this one too.
>
>
> Now I want to do a search on this text file for the word "delete" and if
> it finds that word, it will delete the whole line it occurs on. So
> after this, the text file will look like this one:
>
> //****** text.txt ******
> Keep this line.
> Also keep this line.
> Keep this one too.
>
> Can anyone help me with this? Thanks.
>
> Matt
>
--- End Message ---
--- Begin Message ---
My bad:
while (!feof($fp))
instead of what I wrote earlier.
----- Original Message -----
From: "Hugh Danaher" <[EMAIL PROTECTED]>
To: "Matt Palermo" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, June 05, 2003 10:59 PM
Subject: Re: [PHP] delete lines from text file
> Matt,
> Try something like:
> <?
> $fp=fopen("file_name.txt","r");
> while (!feof($fp))
> {
> $line=fget($fp,100); // grabs text to end of line or 100 characters
> whichever comes first
> if (!preg_match("/delete/",$line))
> {
> $new_line.=$line;
> }
> }
> fclose($fp);
> $fp=fopen("file_name.txt","w");
> fwrite($fp,$new_line) or die ("something died in here");
> fclose($fp);
> ?>
> I didn't check this before posting so there could be some syntax issues,
but
> the flow is what you need. Open a file for reading, read it line by line
to
> find a text phrase, accumulate the lines (less the one with the phrase) in
a
> new variable, close the file, open it again for writing, write the text to
> the file, and then close it.
> Hope this helps,
> Hugh
> ----- Original Message -----
> From: "Matt Palermo" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 05, 2003 8:53 PM
> Subject: [PHP] delete lines from text file
>
>
> > Can anyone help me figure out how to search for a string in a text file,
> > then delete the whole line of text that it occurs in?
> >
> > For example: I have a text file which contains the following.
> >
> > //****** text.txt ******
> > Keep this line.
> > Also keep this line.
> > Delete this line.
> > Keep this one too.
> >
> >
> > Now I want to do a search on this text file for the word "delete" and if
> > it finds that word, it will delete the whole line it occurs on. So
> > after this, the text file will look like this one:
> >
> > //****** text.txt ******
> > Keep this line.
> > Also keep this line.
> > Keep this one too.
> >
> > Can anyone help me with this? Thanks.
> >
> > Matt
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
I am having a problem with this script It pulls a list of numbers from
one field in the database (the numbers are in this format
(275,277,278,276) It needs to pull each number and run it through the
function dofunction and then move on to the next one in tell there are
no more to process. What am I doing wrong or is there a better way to
do this.
sql="Select Numbers from dom where name = '$name'";
$results=safe_query($sql);
$DBRow = mysql_fetch_array($results);
$numbers = $DBRow["Numbers"];
$numbers = array($numbers);
for($i = 0; $i < count($numbers); $i++){
$number = $numbers[$i];
dofunction($number);
}
--
Best regards,
Richard mailto:[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
try changing
$numbers = array($numbers);
to
$numbers = explode(",", $numbers);
HTH
Martin
-----Original Message-----
From: Richard Kurth [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 2:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP] using a for loop but it is not working how come
I am having a problem with this script It pulls a list of numbers from
one field in the database (the numbers are in this format
(275,277,278,276) It needs to pull each number and run it through the
function dofunction and then move on to the next one in tell there are
no more to process. What am I doing wrong or is there a better way to
do this.
sql="Select Numbers from dom where name = '$name'";
$results=safe_query($sql);
$DBRow = mysql_fetch_array($results);
$numbers = $DBRow["Numbers"];
$numbers = array($numbers);
for($i = 0; $i < count($numbers); $i++){
$number = $numbers[$i];
dofunction($number);
}
--
Best regards,
Richard mailto:[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
> I am having a problem with this script It pulls a list of numbers from
> one field in the database (the numbers are in this format
> (275,277,278,276) It needs to pull each number and run it through the
> function dofunction and then move on to the next one in tell there are
> no more to process. What am I doing wrong or is there a better way to
> do this.
>
> sql="Select Numbers from dom where name = '$name'";
> $results=safe_query($sql);
> $DBRow = mysql_fetch_array($results);
> $numbers = $DBRow["Numbers"];
> $numbers = array($numbers);
> for($i = 0; $i < count($numbers); $i++) {
> $number = $numbers[$i];
> dofunction($number);
> }
You have a few problems in your code. This hasn't been tested, but, is a
start...
sql="Select Numbers from dom where name = '$name'";
$results=safe_query($sql);
$DBRow = mysql_fetch_array($results);
$number_array = explode(",", $DBRow["Numbers"]);
// above splits number list into array using comma as delimiter
foreach($number_array as $digit) {
dofunction($digit);
}
Above foreach() construct loops through the array and assigns the value of
each element to $digit, and continues doing this until it reaches the end of
the array.
http://www.php.net/manual/en/control-structures.foreach.php
http://www.php.net/manual/en/function.explode.php
Monty
--- End Message ---
--- Begin Message ---
I'm sure you are already aware of PEAR, if you havent
checked it out, you should
olinux
> > Hey everyone,
> >
> > I find myself building alot of admin control
> areas, or in otherwords, a
> > group of forms that lets an end user control data
> and appearances of his/her
> > site. What I am looking for is a package of
> classes/functions that will help
> > me automate and modularize this process a little
> more. I am not looking for
> > a "complete system", just a framework from which I
> can build. Thanks alot,
> >
> > Christian
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
--- End Message ---
--- Begin Message ---
I think you meant http://phpclasses.org and not http://phpclasses.com
Sincerely
berber
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
-----Original Message-----
From: Justin French [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 4:36 AM
To: christian calloway; [EMAIL PROTECTED]
Subject: Re: [PHP] Administration packages
I've built my own framework over time, and would highly recommend it,
because you get exactly what you want.
but here's a few things that might help:
- some sort of form building/validating class (10's or 100's even at
phpclasses.com)
- read up on some of the large app frameworks... fusebox comes to mind
here, but i'm sure there are others. also look at some large opensource
products built in php (postnuke?, phpbb?, etc). i'm not saying you will
borrow or use what they have at all, but their logic and ideas may rub
off on you
Without knowing EXACTLY what you want to automate, I can't really say
much more.
Justin
on 04/06/03 1:13 PM, christian calloway ([EMAIL PROTECTED]) wrote:
> Hey everyone,
>
> I find myself building alot of admin control areas, or in otherwords,
> a group of forms that lets an end user control data and appearances of
> his/her site. What I am looking for is a package of classes/functions
> that will help me automate and modularize this process a little more.
> I am not looking for a "complete system", just a framework from which
> I can build. Thanks alot,
>
> Christian
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Does anyone know of a simple program that will let me specify a file
within a certain directory to load into a textarea field, let me make
changes, then export/replace that file with the changed contents?
I tried writing one myself in PHP, but I ran into a problem with quotes.
If I had tags in in the text area e.g. <table width="500"> it would
mess up the quotes by adding back slashes etc.
TIA,
-Matt
--
Matt Zur
[EMAIL PROTECTED]
http://www.zurnet.com
Need a Web Site??? - Visit... www.zurnet.com
1997 - 2003 - 6th Anniversary!!!
--- End Message ---
--- Begin Message ---
On Fri, 6 Jun 2003, Matt Zur wrote:
> Does anyone know of a simple program that will let me specify a file
> within a certain directory to load into a textarea field, let me make
> changes, then export/replace that file with the changed contents?
>
> I tried writing one myself in PHP, but I ran into a problem with quotes.
> If I had tags in in the text area e.g. <table width="500"> it would
> mess up the quotes by adding back slashes etc.
Strip them backslashes :)
http://www.php.net/stripslashes
Regards,
Philip
--- End Message ---
--- Begin Message ---
Try this:
<?php
$test='sth="sth"';
$test=htmlentities ($test, ENT_QUOTES);
echo "<input type=textarea value=\"$test\">";
?>
"Matt Zur" <[EMAIL PROTECTED]> píse v diskusním príspevku
news:[EMAIL PROTECTED]
> Does anyone know of a simple program that will let me specify a file
> within a certain directory to load into a textarea field, let me make
> changes, then export/replace that file with the changed contents?
>
> I tried writing one myself in PHP, but I ran into a problem with quotes.
> If I had tags in in the text area e.g. <table width="500"> it would
> mess up the quotes by adding back slashes etc.
>
> TIA,
>
> -Matt
> --
> Matt Zur
> [EMAIL PROTECTED]
> http://www.zurnet.com
>
> Need a Web Site??? - Visit... www.zurnet.com
>
> 1997 - 2003 - 6th Anniversary!!!
>
--- End Message ---
--- Begin Message ---
Maybe this can help :
A simple configuration file editor to ease you life in setting up php
applications. Reads variables from a given file automatically and
displays current value. New value will be written to file after submit.
http://examples.weberdev.com/get_example.php3?count=1741
or
EditPHP - PHP HTML online file editor with encrypted password
authentication
http://examples.weberdev.com/get_example.php3?count=1496
Sincerely
berber
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
-----Original Message-----
From: Matt Zur [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 8:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP - File Edit
Does anyone know of a simple program that will let me specify a file
within a certain directory to load into a textarea field, let me make
changes, then export/replace that file with the changed contents?
I tried writing one myself in PHP, but I ran into a problem with quotes.
If I had tags in in the text area e.g. <table width="500"> it would
mess up the quotes by adding back slashes etc.
TIA,
-Matt
--
Matt Zur
[EMAIL PROTECTED]
http://www.zurnet.com
Need a Web Site??? - Visit... www.zurnet.com
1997 - 2003 - 6th Anniversary!!!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi
Thanks, I DID use \n, BUT, I made a stupid mistake, I did:
<textarea>
<?php
echo $word.'\n';
?>
</textarea>
And the literal ' did not "parse" the \n, replacing with " works fine...
On Thu, 2003-06-05 at 16:32, CPT John W. Holmes wrote:
> > I want to have a textarea that contains details read from a mysql table,
> > but I want to echo each row so that it is on a new line. What is the
> > "new-line" character for a textarea? ( in effect the reverse of nl2br()
>
> A newline is \n
>
> $text = "word\nword\nword\n";
>
> echo "<textarea>$word</textarea>";
>
> will have each "word" on a different line.
>
> ---John Holmes...
--- End Message ---
--- Begin Message ---
how do they create the different fonts as a png-file ?
--- End Message ---
--- Begin Message ---
Hello,
Im trying to find a free php+mysql shopping cart, I have tried oscommerce
but coudlnt edit some of the scripts.
Does anyone know an php script that is very customizable and has a lot
features too? And ofcourse its free.
Thanks,
Louie
--- End Message ---
--- Begin Message ---
of course u can edit the scripts u will not find one that u dont have to rip
the guts out of and customise
-----Original Message-----
From: Miranda, Joel Louie M [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 6:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP + MySQL Free Shopping Cart
Hello,
Im trying to find a free php+mysql shopping cart, I have tried oscommerce
but coudlnt edit some of the scripts.
Does anyone know an php script that is very customizable and has a lot
features too? And ofcourse its free.
Thanks,
Louie
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Or as Jason noted at compile time.
Monte Ohrt wrote:
ok, so there are plenty of ways to work around it ;-) I guess my
original question should be answered as such? "No, you cannot specify a
different configuration file name other than php.ini, you must either
hack the C code or supply a workaround at runtime."
Monte
On Thu, 2003-06-05 at 15:07, Mark wrote:
Wrap it in a shell script or batch file.
Something like:
REM ---Start cli.bat---
./cli/php.exe -c <<cli-php.ini location>> %1 %2 %3 %4 %5 %6 %7 %8 %9
@exit
REM ---End cli.bat---
--- Monte Ohrt <[EMAIL PROTECTED]> wrote:
Hi Adam,
I know it can be altered with a command-line switch, but it is the
default that I want to change. I don't want to have to remember to
set
the -c flag everytime, or go back and change all my existing
scripts.
Monte
On Thu, 2003-06-05 at 09:53, Adam Voigt wrote:
From a ./php -h:
-c <path>|<file> Look for php.ini file in this directory
The "|" means "OR", so logic would dictate you can point
directly to the file with the -c option.
On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote:
Hi Cal,
I may be missing something, but I don't see how this page
answers either
of my questions. ini_set() is for setting configuration
options.
Monte
On Thu, 2003-06-05 at 09:23, Cal Evans wrote:
http://www.php.net/manual/en/function.ini-set.php
* Cal Evans
* http://www.christianperformer.com
* Stay plugged into your audience
* The measure of a programmer is not the number of lines of
code he writes
but the number of lines he does not have to write.
*
----- Original Message -----
From: "Monte Ohrt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, June 05, 2003 9:22 AM
Subject: [PHP] PHP CLI question
Hi,
A couple of questions:
1) Is there a way to make the CLI version of PHP ignore
certain settings
in the php.ini file? For instance, I don't want the ioncube
accelerator
invoked when using PHP from the command line. My current
work around is
to use two separate init files, php.ini and php-cli.ini ...
and this
brings me to my second question:
2) Is there a way to specify a different name for the
php.ini file,
apart from hacking php_ini.c ? It seems I can only change
the _path_ to
the file, but not the filename itself.
TIA
Monte
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Monte Ohrt <[EMAIL PROTECTED]>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
=====
Mark Weinstock
[EMAIL PROTECTED]
***************************************
You can't demand something as a "right" unless you are willing to fight to death to
defend everyone else's right to the same thing.
***************************************
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
--- End Message ---
--- Begin Message ---
> Have you tried:
> ob_end_clean();
> header("Location: http://...");
> to throw away the contents of the output buffer before sending the
> Location header, then its nice and clean.
Yes I tried ...
Other idea ???
--- End Message ---
--- Begin Message ---
How i do create alphabetical index links with data in a table?
for example i have table like this:
category
-------------
apple
bread
cornflakes
doughnut
egg
with the above records i want to create alphabetical links like click on the letter to
check its listing [A] - [B] - [C] - [D] - [E]
so if someone clicks on [B] the link should take them to bread section.
Many thanks
awlad
_______________________________________________________________________
Sheridan Phoenix Company
The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB
Email: [EMAIL PROTECTED]
Phone: 01582 522 330
Fax: 01582 522 328
_______________________________________________________________________
This electronic transmission is strictly confidential and intended
solely for the addressee. If you are not the intended addressee, you
must not disclose, copy or take any action in reliance of this
transmission. If you have received this transmission in error it would
be helpful if you could notify The Sheridan Phoenix Company Ltd as soon
as possible.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of The
Sheridan Phoenix Company Ltd.
--- End Message ---
--- Begin Message ---
This should solve your problem.
<?php
function & build_link($word="")
{
static $prev_letter;
// Extract the first letter
$first_letter = substr($word,0,1);
if($prev_letter != $first_letter)
{
$prev_letter = $first_letter;
return ' [<a href="letter_'.$prev_letter.'.htm">'.$prev_letter.'</a>] ';
}
else
return false;
}
$your_word_list = array('apple','bread','cornflakes','doughnut','egg');
foreach($your_word_list as $w)
{
$link = build_link($w);
if(!empty($link))
echo $link;
}
?>
atur
____________________________________________
----- Original Message -----
From: "Awlad Hussain" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 06, 2003 11:14 AM
Subject: [PHP] Creating alphabetical index links
How i do create alphabetical index links with data in a table?
for example i have table like this:
category
-------------
apple
bread
cornflakes
doughnut
egg
with the above records i want to create alphabetical links like click on the
letter to check its listing [A] - [B] - [C] - [D] - [E]
so if someone clicks on [B] the link should take them to bread section.
Many thanks
awlad
_______________________________________________________________________
Sheridan Phoenix Company
The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB
Email: [EMAIL PROTECTED]
Phone: 01582 522 330
Fax: 01582 522 328
_______________________________________________________________________
This electronic transmission is strictly confidential and intended
solely for the addressee. If you are not the intended addressee, you
must not disclose, copy or take any action in reliance of this
transmission. If you have received this transmission in error it would
be helpful if you could notify The Sheridan Phoenix Company Ltd as soon
as possible.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of The
Sheridan Phoenix Company Ltd.
--- End Message ---
--- Begin Message ---
Not sure this will work and I wont try right now...
SELECT * FROM $table WHERE SUBSTRING(FIELD_WITH_NAMES,0,1) = '$letter' ORDER
BY FIELD_WITH_NAMES...
You could always try I guess, but I really don't think it would work...
"Awlad Hussain" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
How i do create alphabetical index links with data in a table?
for example i have table like this:
category
-------------
apple
bread
cornflakes
doughnut
egg
with the above records i want to create alphabetical links like click on the
letter to check its listing [A] - [B] - [C] - [D] - [E]
so if someone clicks on [B] the link should take them to bread section.
Many thanks
awlad
_______________________________________________________________________
Sheridan Phoenix Company
The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB
Email: [EMAIL PROTECTED]
Phone: 01582 522 330
Fax: 01582 522 328
_______________________________________________________________________
This electronic transmission is strictly confidential and intended
solely for the addressee. If you are not the intended addressee, you
must not disclose, copy or take any action in reliance of this
transmission. If you have received this transmission in error it would
be helpful if you could notify The Sheridan Phoenix Company Ltd as soon
as possible.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of The
Sheridan Phoenix Company Ltd.
--- End Message ---
--- Begin Message ---
Hi guys,
we set up a new resource for organizing all books on PHP in a quick-to-scan,
Google-like center. Hope you enjoy it.
http://www.phpbooks.com
Mark
--- End Message ---
--- Begin Message ---
weldone,
Very neat desgin
----- Original Message -----
From: "Mark Owen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 06, 2003 10:07 AM
Subject: [PHP] [FYI] phpbooks.com
> Hi guys,
>
> we set up a new resource for organizing all books on PHP in a
quick-to-scan,
> Google-like center. Hope you enjoy it.
>
> http://www.phpbooks.com
>
> Mark
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
> we set up a new resource for organizing all books on PHP in a
quick-to-
> scan,
> Google-like center. Hope you enjoy it.
>
> http://www.phpbooks.com
There's more than that, isn't there? Also the "PHP/MySQL Programming for
the Absolute Beginner" book shows a picture of a Perl book... :)
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--- End Message ---
--- Begin Message ---
> > we set up a new resource for organizing all books on PHP in a
> quick-to-
> > scan,
> > Google-like center. Hope you enjoy it.
> >
> > http://www.phpbooks.com
>
> There's more than that, isn't there? Also the "PHP/MySQL Programming for
> the Absolute Beginner" book shows a picture of a Perl book... :)
The complete data is retrieved daily from Amazon.com (with their Webservices
API) using the keyword "php" for the search. If anyone is interested, I can
make available parts of the source code.
Mark
--- End Message ---
--- Begin Message ---
Hi,
Tell me if I am missing something but, since all your site is doing is
pulling data/books from amazon....why wont someone just goto amazon's book
category type "php" and buy direct?
I mean if someone is into programming/php they will have enough brains (most
of the time) to do that much right?
BTW, nice design.
Cheers,
-Ryan
----- Original Message -----
From: "Mark Owen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, June 06, 2003 12:24 PM
Subject: Re: [PHP] [FYI] phpbooks.com
> > > we set up a new resource for organizing all books on PHP in a
> > quick-to-
> > > scan,
> > > Google-like center. Hope you enjoy it.
> > >
> > > http://www.phpbooks.com
> >
> > There's more than that, isn't there? Also the "PHP/MySQL Programming for
> > the Absolute Beginner" book shows a picture of a Perl book... :)
>
> The complete data is retrieved daily from Amazon.com (with their
Webservices
> API) using the keyword "php" for the search. If anyone is interested, I
can
> make available parts of the source code.
>
> Mark
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Ryan,
it's just a little experiment in information design: if you make it easier
and quicker to search, browse and sort data, will people use it?
Sometimes if feels like overkill to use Amazon if you just want a quick
update on books for a specific subject. That's the reason for this site...
if and as long as people use it, we'll keep it up. :)
Mark
----- Original Message -----
From: "Ryan A" <[EMAIL PROTECTED]>
To: "Mark Owen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, June 06, 2003 4:03 PM
Subject: Re: [PHP] [FYI] phpbooks.com
> Hi,
> Tell me if I am missing something but, since all your site is doing is
> pulling data/books from amazon....why wont someone just goto amazon's book
> category type "php" and buy direct?
> I mean if someone is into programming/php they will have enough brains
(most
> of the time) to do that much right?
>
> BTW, nice design.
>
> Cheers,
> -Ryan
>
> ----- Original Message -----
> From: "Mark Owen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, June 06, 2003 12:24 PM
> Subject: Re: [PHP] [FYI] phpbooks.com
>
>
> > > > we set up a new resource for organizing all books on PHP in a
> > > quick-to-
> > > > scan,
> > > > Google-like center. Hope you enjoy it.
> > > >
> > > > http://www.phpbooks.com
> > >
> > > There's more than that, isn't there? Also the "PHP/MySQL Programming
for
> > > the Absolute Beginner" book shows a picture of a Perl book... :)
> >
> > The complete data is retrieved daily from Amazon.com (with their
> Webservices
> > API) using the keyword "php" for the search. If anyone is interested, I
> can
> > make available parts of the source code.
> >
> > Mark
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
--- End Message ---
--- Begin Message ---
Hey Mark,
As an experiment I guess its ok, but as a steady stream of money I had my
doubts.
Best of luck.
Cheers,
-Ryan
----- Original Message -----
From: "Mark Owen" <[EMAIL PROTECTED]>
To: "Ryan A" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, June 06, 2003 2:13 PM
Subject: Re: [PHP] [FYI] phpbooks.com
> Ryan,
>
> it's just a little experiment in information design: if you make it easier
> and quicker to search, browse and sort data, will people use it?
>
> Sometimes if feels like overkill to use Amazon if you just want a quick
> update on books for a specific subject. That's the reason for this site...
> if and as long as people use it, we'll keep it up. :)
>
> Mark
>
> ----- Original Message -----
> From: "Ryan A" <[EMAIL PROTECTED]>
> To: "Mark Owen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, June 06, 2003 4:03 PM
> Subject: Re: [PHP] [FYI] phpbooks.com
>
>
> > Hi,
> > Tell me if I am missing something but, since all your site is doing is
> > pulling data/books from amazon....why wont someone just goto amazon's
book
> > category type "php" and buy direct?
> > I mean if someone is into programming/php they will have enough brains
> (most
> > of the time) to do that much right?
> >
> > BTW, nice design.
> >
> > Cheers,
> > -Ryan
> >
> > ----- Original Message -----
> > From: "Mark Owen" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Friday, June 06, 2003 12:24 PM
> > Subject: Re: [PHP] [FYI] phpbooks.com
> >
> >
> > > > > we set up a new resource for organizing all books on PHP in a
> > > > quick-to-
> > > > > scan,
> > > > > Google-like center. Hope you enjoy it.
> > > > >
> > > > > http://www.phpbooks.com
> > > >
> > > > There's more than that, isn't there? Also the "PHP/MySQL Programming
> for
> > > > the Absolute Beginner" book shows a picture of a Perl book... :)
> > >
> > > The complete data is retrieved daily from Amazon.com (with their
> > Webservices
> > > API) using the keyword "php" for the search. If anyone is interested,
I
> > can
> > > make available parts of the source code.
> > >
> > > Mark
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
>
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Saint Urho [mailto:[EMAIL PROTECTED]
> Sent: 05 June 2003 20:14
>
> I want to add some directories to the "include path" entry in the
> php.ini file. I have to do this via the .htaccess file
> because I do not
> have access to the php.ini file on the server.
>
> Will the additional directories in the .htaccess file replace the
> directories in the php.ini file or will the ones in the
> .htaccess file
> be added to the directories in the php.ini file?
Replace.
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
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Stephen [mailto:[EMAIL PROTECTED]
> Sent: 05 June 2003 19:15
>
> Here's my javascript link code for each day of the month in
> the calendar script:
>
> print "<a href=\"#\"
> onClick=\"window.opener.document.".$HTTP_GET_VARS['name'].".da
> te.value='$y-$m-$d';\">$d</a>";
>
> $HTTP_GET_VARS['name'] holds the text field name, ie
> delivery[3322ffds]. If I replace the name either order in the
> text field and as the variable I pass in the URL it works fine.
You need to make use of the JavaScript ['id'] identity with .id (see any good
JavaScript book for more on this), thus:
print "<a href=\"#\"
onClick=\"window.opener.document['" . $HTTP_GET_VARS['name'] .
"'].date.value='$y-$m-$d';\">$d</a>";
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
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Maurício Valente [mailto:[EMAIL PROTECTED]
> Sent: 05 June 2003 21:56
>
> I couldn't find the option max_body_request somebody knows
> where it is?
There's no such option -- you could be looking for post_max_size in php.ini,
or the LimitRequestBody directive in Apache's httpd.conf or a .htaccess
file.
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
--- End Message ---
--- Begin Message ---
OK, now I have I have been convinced that PHP is the best thing since cheese
burgers, I have a question...
How easy is it to... Have a set of 6 HTML drop downs each with texted based
info that when selections are made generate a dynamic on screen price?
So in english, drop down one could be vehicle type, drop down two could be
engine size, three is CD player (yes / no selection). OK?
So would I need to make a DB for this? (Baring in mind the prices are pretty
much static) or can I justy define the variables in an include?
Or am I talking rubbish?
Cheers,
S
--- End Message ---
--- Begin Message ---
You could do all of that easily...
"Simon Thurtle" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> OK, now I have I have been convinced that PHP is the best thing since
cheese
> burgers, I have a question...
> How easy is it to... Have a set of 6 HTML drop downs each with texted
based
> info that when selections are made generate a dynamic on screen price?
>
> So in english, drop down one could be vehicle type, drop down two could be
> engine size, three is CD player (yes / no selection). OK?
>
> So would I need to make a DB for this? (Baring in mind the prices are
pretty
> much static) or can I justy define the variables in an include?
>
> Or am I talking rubbish?
>
> Cheers,
>
> S
>
>
>
--- End Message ---
--- Begin Message ---
sounds to me more like a JavaScript issue. Of course, you would need PHP to
access a database in case that car information is stored there (and populate
dinamically the <select> element) but the rest is fairly easy.
iatz.
"Simon Thurtle" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> OK, now I have I have been convinced that PHP is the best thing since
cheese
> burgers, I have a question...
> How easy is it to... Have a set of 6 HTML drop downs each with texted
based
> info that when selections are made generate a dynamic on screen price?
>
> So in english, drop down one could be vehicle type, drop down two could be
> engine size, three is CD player (yes / no selection). OK?
>
> So would I need to make a DB for this? (Baring in mind the prices are
pretty
> much static) or can I justy define the variables in an include?
>
> Or am I talking rubbish?
>
> Cheers,
>
> S
>
>
>
--- End Message ---
--- Begin Message ---
Take a look at http://www.zend.com/zend/tut/drop-down.php
Luis
-----Original Message-----
From: Simon Thurtle [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 4:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How easy is this idea?
OK, now I have I have been convinced that PHP is the best thing since cheese
burgers, I have a question...
How easy is it to... Have a set of 6 HTML drop downs each with texted based
info that when selections are made generate a dynamic on screen price?
So in english, drop down one could be vehicle type, drop down two could be
engine size, three is CD player (yes / no selection). OK?
So would I need to make a DB for this? (Baring in mind the prices are pretty
much static) or can I justy define the variables in an include?
Or am I talking rubbish?
Cheers,
S
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi
I need a code that can read e-mail and save to files with their
attachments using mime types.
Thanks
--
------------------------------------------------------------------------
Alper Sarı
Bilgi Teknolojisi Birimi
Sabancı Üniversitesi
Orhanlı 34956 Tuzla
İstanbul
Tel: 0216 483 91 75
Faks: 0216 483 91 86
Web: http://people.sabanciuniv.edu/alper/
------------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
What wrong with this code? i am tryin to create an array from the while loop, but i
only get one value :(
while($rowmenu = mysql_fetch_array($resultmenu)){
while (list($k, $v) = each ($rowmenu)) {
$val[$k] = $v;
}
}
Basically the $rowmenu returns more than one records.. and i want to put the keys and
vlaues of $rowmenu into an array
any idea??
awlad
_______________________________________________________________________
Sheridan Phoenix Company
The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB
Email: [EMAIL PROTECTED]
Phone: 01582 522 330
Fax: 01582 522 328
_______________________________________________________________________
This electronic transmission is strictly confidential and intended
solely for the addressee. If you are not the intended addressee, you
must not disclose, copy or take any action in reliance of this
transmission. If you have received this transmission in error it would
be helpful if you could notify The Sheridan Phoenix Company Ltd as soon
as possible.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of The
Sheridan Phoenix Company Ltd.
--- End Message ---
--- Begin Message ---
while (list($k, $v) = each ($rowmenu)) {
$val[] = $v;
}
}
try that
-----Original Message-----
From: Awlad Hussain [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 8:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Array
What wrong with this code? i am tryin to create an array from the while
loop, but i only get one value :(
while($rowmenu = mysql_fetch_array($resultmenu)){
while (list($k, $v) = each ($rowmenu)) {
$val[$k] = $v;
}
}
Basically the $rowmenu returns more than one records.. and i want to put the
keys and vlaues of $rowmenu into an array
any idea??
awlad
_______________________________________________________________________
Sheridan Phoenix Company
The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB
Email: [EMAIL PROTECTED]
Phone: 01582 522 330
Fax: 01582 522 328
_______________________________________________________________________
This electronic transmission is strictly confidential and intended
solely for the addressee. If you are not the intended addressee, you
must not disclose, copy or take any action in reliance of this
transmission. If you have received this transmission in error it would
be helpful if you could notify The Sheridan Phoenix Company Ltd as soon
as possible.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of The
Sheridan Phoenix Company Ltd.
--- End Message ---
--- Begin Message ---
I have a page that allows a user to login, provided their username and
password files from a previous form, match an entry in a MySQL database.
All fairly standard.
How can I get that to talk to $PHP_AUTH_USER?
When I use an .htaccess file to a directory that's protected, I don't want
the user to see a pop up box (unless they are already logged in)
I want my form to register the $PHP_AUTH_USER varaiable...
I've got mod_auth_mysql installed on my apache server...
any ideas?
Tris...
***********************************************************************
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
************************************************************************
--- End Message ---
--- Begin Message ---
need knowledge help - what do you suggest to use:
$mc = new myclass();
or
$mc = &new myclass();
because in any tutorial I can see the first form, but on page "what references do" in
PHP manual I found out the
second form
so?
5o
--- End Message ---
--- Begin Message ---
HI,
I'm using "urldecode" function to decode string from
"getenv("QUERY_STRING");", but part of
it is in cyrrilic (windows-1251) charset.
I have following code:
$a="%D1%81%D1%87%D0%B5%D1%82%D0%BE%D0%B2%D0%BE%D0%B4%D0%BD%D0%B0+%D0%BA%D1%8
A%D1%89%D0%B0";
$b="%d1%ee%f4%f2%f3%e5%f0";
echo "a=" . urldecode($a);
echo "<br>b=" . urldecode($b);
On the second string it works correctly, but on first it don't.
These two vars are getted from two different pages ( as refferers ).
I think the problem could be in encoding used in two pages.
Can someone help me ?
Thanks,
Rosen
--- End Message ---
--- Begin Message ---
"Rosen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> HI,
> I'm using "urldecode" function to decode string from
> "getenv("QUERY_STRING");", but part of
> it is in cyrrilic (windows-1251) charset.
>
> I have following code:
>
>
$a="%D1%81%D1%87%D0%B5%D1%82%D0%BE%D0%B2%D0%BE%D0%B4%D0%BD%D0%B0+%D0%BA%D1%8
> A%D1%89%D0%B0";
> $b="%d1%ee%f4%f2%f3%e5%f0";
>
> echo "a=" . urldecode($a);
> echo "<br>b=" . urldecode($b);
>
> On the second string it works correctly, but on first it don't.
> These two vars are getted from two different pages ( as refferers ).
> I think the problem could be in encoding used in two pages.
When I run the code without setting a charset (defaulting to UTF-8), I get
back the following:
a=?????????? ????
b=????ody>
When I run the code setting the charset to windows-1251, I get:
a=???‡?µ?‚???????????° ?????‰?°
b=???????
I'm guessing you want "a" from the first one and "b" from the second one.
In which case, you are correct. Two different character encodings are being
URL encoded. You could convert the first string using:
convert_cyr_string(mb_convert_encoding(urldecode($a), 'ISO-8859-5',
'UTF-8'), 'i', 'w')
--
---
Seairth Jacobs
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
[snip]
Yes it can be done, using the auto-prepend feature call a script that
turns output buffering on. Then in the auto-appended script read the
buffer a manipulate ith with the automatic header and footer. Thus you
modify the content only and achieve what you want without modifying
the actual HTML file.
[/snip]
There are so many ways to skin this cat. You could (as you said, it will
require adding HTML to the list of php parsed file types) have the
header, body, and footer files read into a single file and then output.
You could do something like this ... (a lot of folks use the following
simple method to include navigation in web pages)...
<html>
<head></head>
<body>
<?php
include("headerfile.inc");
?>
... other html ...
... other html ...
... other html ...
... other html ...
<?php
include("footerfile.inc");
?>
</body>
</html>
I do not think that this needs to be difficult, but if you want more
complexity you could have it.
HTH!
Jay
--- End Message ---
--- Begin Message ---
Hi,
There is no core created on the server.
I use the same libphp4.so on an other web server on the same machine, and I
have no problem of restart ns-httpd.
The problem seem to happen when there is a lot of users on the web server.
Can I modify obj.conf or magnus.conf to optimize the web server ?
Can I use perfdump to see more information ?
Can I optimize PHP to work fine with a lot of charge ?
For exeample with option '--without-pear' '--disable-FEATURE'
'--disable-xml' in configure ?
AL
Andre Lagadec a écrit :
> Hello,
>
> On Sun Solaris with Iplanet 4.1 et PHP 4.2.3, I have theses messages on
> the error log
> of the Web server :
> [04/Jun/2003:16:04:54] info ( 7643): php4_init reports: Initialized PHP
> Module
> [04/Jun/2003:16:09:57] info ( 7679): php4_init reports: Initialized PHP
> Module
> [04/Jun/2003:16:11:12] info ( 7690): php4_init reports: Initialized PHP
> Module
> [04/Jun/2003:16:17:17] info ( 7742): php4_init reports: Initialized PHP
> Module
> [04/Jun/2003:16:17:25] info ( 7745): php4_init reports: Initialized PHP
> Module
> [04/Jun/2003:16:19:26] info ( 7761): php4_init reports: Initialized PHP
> Module
> [04/Jun/2003:16:37:52] info ( 7906): php4_init reports: Initialized PHP
> Module
> [04/Jun/2003:16:47:24] info ( 7985): php4_init reports: Initialized PHP
> Module
> [04/Jun/2003:16:48:40] info ( 7992): php4_init reports: Initialized PHP
> Module
> [04/Jun/2003:16:50:04] info ( 8002): php4_init reports: Initialized PHP
> Module
> [04/Jun/2003:16:54:13] info ( 8032): php4_init reports: Initialized PHP
> Module
>
> And at the same time, I have theses other messages on the console :
> Jun 4 16:04:53 server1 uxwdog[23185]: server terminated (signal 10):
> watchdog is restarting it
> Jun 4 16:09:56 server1 uxwdog[23185]: server terminated (signal 11):
> watchdog is restarting it
> Jun 4 16:11:12 server1 uxwdog[23185]: server terminated (signal 10):
> watchdog is restarting it
> Jun 4 16:17:24 server1 last message repeated 2 times
> Jun 4 16:19:25 server1 uxwdog[23185]: server terminated (signal 11):
> watchdog is restarting it
> Jun 4 16:37:51 server1 uxwdog[23185]: server terminated (signal 10):
> watchdog is restarting it
> Jun 4 16:47:23 server1 uxwdog[23185]: server terminated (signal 11):
> watchdog is restarting it
> Jun 4 16:48:40 server1 uxwdog[23185]: server terminated (signal 10):
> watchdog is restarting it
> Jun 4 16:50:03 server1 uxwdog[23185]: server terminated (signal 11):
> watchdog is restarting it
> Jun 4 16:54:12 server1 last message repeated 1 time
>
> Why the process ns-httpd is restarting ? Is-it due to PHP ?
> How can I debug this ?
>
> AL
--- End Message ---
--- Begin Message ---
If the file is binary, try fopen($file_path, "wb");
"Cf High" <[EMAIL PROTECTED]> ~{P4HkO{O"PBNE~}
:[EMAIL PROTECTED]
> Hey all.
>
> Quick question here that's driving me up the wall:
>
> Using fopen(), I'm easily able to open files for reading; however, when I
> attempt to open files for writing using fopen($file_path, "W+"), an error
> occurs.
>
> I'm able to use fopen($file_path, "a+"), but I need to be able to
overwrite
> files; not write to the end of the file.
>
> Again, I'm testing on windows here..........
>
> Any suggestions greatly appreciated,
>
> --Noah
>
>
--- End Message ---
--- Begin Message ---
Any way in PHP to grab form info and then encrypt it with PGP before
sending it out as an email?
-Ben
--- End Message ---
--- Begin Message ---
Anybody know of a Netbilling Gateway that I can plug into my shopping
cart?
--- End Message ---
--- Begin Message ---
Someone who knows php helped me to put together this code to show resulty screen.
There were about 30 items on the working model.
I tried to modify it to showing the Date and only the long comment item q40.
But all that gets shown is: ] (this symbol)
Here is my HTML code in the Adj03.php file.
I have been wracking my brain and any help is much appreciated!!
gloria
-------------------------------
/* Printing results in HTML */
---------------------------------------
/* COMMENTED 2002-05-02
print "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "\t<tr>\n";
foreach ($line as $col_value) {
print "\t\t<td>$col_value</td>\n";
}
print "\t</tr>\n";
}
print "</table>\n";
*/
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
printf("
<div class=\"colorfield\">
<table>
<tr><th>Date</th><th>Q40</th></tr>\n
<tr><td>%s</td><td>%s</td></tr>
</table>
</div>
<br />
<br />\n",
$row['added'],
$row['q40']);
}
/* Free resultset */
mysql_free_result($result);
/* Close the database connection */
mysql_close($link);
?>
</body>
</html>
--- End Message ---