Adam,
> I have always had the opinion that the more comments you put into php
> scripts, the slower they will run because there is more data to be read...
> Can someone tell me if there is any truth in this or whether commenting
has
> absolutely 'no' impact on the performance of a script?
An ans
Neatly done Ernest!
Also in showing how these questions are best answered with five minutes on
the PC, than a msg to the list...
> At 12:58 24.11.2002, DL Neil said:
> [snip]
> >Why don't you run a microtime testbench to time a
Ernest,
> Some time ago I've made myself a framework for such tests and have run it
> against a commented loop. This test was run on a dual PIII/1000 Dell
server.
>
> $hpr = _fwx_profile_start('Loop with end-of-line comment', true);
> for ($i = 0; $i < 100; ++$i) {
> $a += 1;
Hi gamin,
>Running Red Hat 7.2, PHP 4.0.6. Is there any way of knowing if a
certain
> PHP script was run from the command line, shell script or through the
> webserver (Apache). May be i could check the user calling the script and
> find out but how would i do that ?
There is a difference in
Excuse me breaking in...somewhat similar problem:
Have set up a client recently, preaching security persuaded them into
updating so that could run Register_Globals=Off. Now they want to install a
'wiki' which requires (to my horror) Register_Globals=On.
Short of two Apache/PHP servers, what is a
Justin,
Neat!
Don't limit thoughts to PHP when can solve it in Apache - thank you,
=dn
> a .htaccess file in the directory you want RG OFF (ie /wiki/) should do
the
> trick:
>
>
> php_flag register_globals on
>
>
> This seems to work for me...
>
>
>
Jason,
ad infinitum, ad nauseum
However it was your recent post that (sig file) quoted the Freudian:
ontogency recapitulates phylogeny
We should make them become more like us
- even if we kill them in the process!
=dn
> On Sunday 24 November 2002 22:58, DL Neil wrote:
> > Neatly do
Mattia,
> Can anyone suggest an ELEGANT way to find out if an array is made of empty
> strings or not?
> example
> $a = Array( '' , '' , '' ); //ok
> $b = Array( '' , '' , 'error' ); // not ok
> $c = Array( 'error' , '' , 'error' ); // not ok
implode() then check for nullstring/count characters.
Ed,
Assuming there will be a response from the db-tbl, here is another choice:
if ( $lineone . $linetwo . $linethree . $linefour > "" )
{
//show it to the user and ask if they want to change it
}
else
{
//prompt for information
}
Do you mean that the db-tbl will have a row of data even if t
Ryan,
> Anyone know how to get the script path (not the current working directory,
> but the actual path of the executing script) of a commandline script?
>
> I've dug through the docs and can't find this anywhere. None of the
> typical $_SERVER variables return the script path (although several
Gidday Philip,
Full answer: http://www.oreilly.com/catalog/regex/
Short answer: PHPBuilder etc have articles introducing the use of RegExes
(Regular Expressions) for this sort of thing.
(but please not the Arthurian "how do I validate an email address"...)
Regards,
=dn
> Where should i start,
Hi Mike;
> sorry for posting this mysql question again. im searching for a report
> builder for mysql specifically for creating reports for
> invoice/receipt..etc.
> just like crystal reports and oracle report builder. or is there any
> suggestion to do it in PHP .
On my travels (FWIW) I have
Hi Jesús,
> I have several subnets in my network and want to show different webs
> depending on the subnet the user was.
>
> I know how to get the IP but not how to compare two IPs numeracally, I
mean:
>
>
> If ((USER-IP > 192.168.0.1) && (USER-IP < 192.168.0.255))
> Else if ((USER-IP > 192.168.1.
Hello Ade,
> Is it possible to detect with PHP whether an email sent using the PHP
> 'mail' function has bounced back or has not been delivered?
>
> I currently all ready check the email address using the 'ereg' function
> before the mail function is called, but this only checks the format is
> va
Hello Martin,
> I start a console app with
>
> php myscript.php4 (just prints "ok").
>
> How can I give parameters to it? I tried:
> php myscript.php4 myparameter
> php myscript.php4?myparameter
> php myscript.php4?param=myparameter
>
> But always php just returns without doing nothing (not eve
Martin,
Ah yes, the famous 'read the upgrade notes - gotcha'!
Well done, you figured it out...
=dn
> ll I found a
> register_argc_argv = On
>
> in my php.ini, which should work then. But I also found, that I have to
use
>
> print "Ok: ".$_SERVER["argv"][1];
>
> instead of
> print "Ok: ".$argv[1];
Beth,
> When fopen successfully opens a file it populates an array
> $http_response_header, which you can examine to see if the link works or
> not - I don't believe you can actually get the file itself, but since
> that's not what we're after that's not a problem!
I noticed this reference to "$h
Rob/Beth,
The code should also consider:
1 updating the db if the link is 'valid', ie if previously it had been
'down'!
2 putting an @ to prevent any errors causing a hard-stop at the fopen line
3 that the url/database must contain protocol information, ie
http://www.nytimes.com not www.nytimes.c
Ryan,
> My Problem:
> I've got a PHP script (running on Apache) that can take several hours
> to complete. The script sends out a newsletter to those who have
> requested it. When calling this script from a web browser, the browser
> hangs until the script has fully executed. If the user hits "Sto
Hi Shaun,
> please could someone tell me how i can return a month in text from an int
ie
> getMonth(12)
> returns Decmber. Is this possible?
No. If you want to stick with this, write your own function to look up a
text array.
If the "12" is part of more data coming in from a form or db (for exa
Hi Victor,
Welcome to the wonderful world of PHP!
> I'm new in PHP. Could you point me where can i download a sample script
> about how can i paginate some results?
PHP essentially exists to output HTML. You cannot paginate in HTML (although
there is some fancy CSS that could be employed).
Sorr
Hello Dev,
> Now I am continuing on with the same script and I need to check for valid
> IP address form.
> Currently I have:
>
> $ip="255.255.255.0";
> if (preg_match ("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/", $ip))
{
> print "Good Ip";
> } else {
> print "Bad Ip";
> }
>
> Thi
John,
> I think it'd be hard to verify the range with a regex. ip2long and long2ip
> do not validate. So, an option would be to write your own little function
> that splits the $ip on the period, verifies there are 4 parts, then checks
> that each part is between 1 and 255 inclusive.
My other po
> $this="that";
> return $ip_state;
> }
>
> function net_check($ip_2_chk){
> $parts=explode(".",$ip_2_chk);
> if($parts[0]==10){
> $network="internal";
> }
> elseif($part
Hey Andy,
> I'm trying to track down a problem with someone else's
> code. Our hosting service changed PHP versions on us
> (up to 4.0.6), and everything broke. I think I have
> tracked down at least part of the problem. We have a
>...
Ascertain differences by printing out a phpinfo() report for
Hi Thomas,
> SELECT * from $DB_TBLName WHERE
> (Trim(WorkerEmail)='$userReplacementEmail')
> AND AND OR OR OR OR OR
This is all a bit complicated, and a simple boy like me gets lost too
easily. KISS principle: Keep it simple...
You have two employees:
A, so named because he Already has Annu
Thomas (and list),
The solution, as previously posted, is flawed/incomplete - mea culpa.
Excuse: I was interrupted three times from typing the word SELECT until
pressing Send, and then rushing to get on to the next call on my time...
>WHERE bstart < afinish
> OR bfinish > astart;
Check
Hi Anthony,
> I'm using MS Win 98 and my ISP has PHP installed on a MS server.
> I'd like to display a HTML form box on my site for users to type in a
> message utilizing the PHP mail() function.
>
> I've tested this using Apache on my drive with a html form and a php
script
> to receive the data
Hi Anthony
> Qusetion: 1:
> What would happen if I changed the php.ini settings to:
> SMTP=mail.yourisp.com
> sendmail_from=MyAddress@MyDomain
> as opposed to:
> >SMTP=smtp.ISPs.domain
=as long as the SMTP server is accessible and you have access rights, then
it can be anyone's/anywhere...
> >
Anthony,
Do you have an SMTP server on your Win98 localhost?
Recommend you change the PHP.INI SMTP= to say the same as your email
package's server definitions.
=dn
> I'm using MS Win98 and Apache and getting the following after submitting
the
> mail form:
> ..
> Warning: Failed to Conn
imple boy), forget all the optional headers etc, just
use a stripped down/simple email stub-script for testing/proving.
=If PHP's mail() can be persuaded to work, thereafter it (and any scripts)
can be 'tweaked'/made better - or we can look back and compare...
=dn
> - Origi
PHP v4.2.3 with Apache 1.3.24 under Win2000 Prof SP2
Downloaded the full v4.2.3 zip package/Win binary, some weeks ago.
Installation went fine. Extensions are happily included. Have had several
weeks of operations.
Decided to install cURL to do some URL (strangely enough) link
verification-checki
Hi Tom,
> >> I know the text editor question has been beat to death, but I'm looking
> >> for a simple editor with syntax highlighting that can be installed in
> >> Windows by a general user. It would have to be something that didn't
> >> access the registry, as normal users can't do that. Does an
(pardon the pun)
Please recommend a Snoopy tutorial,
=dn
PS Google has not been my friend!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Justin,
Jumping in late...
> >> Daylight Savings Time?
> > John, I think "Daylight Saving Time" creates a difference of 1 hour and
not
> > 1 day :)
> True... but I checked it anyway -- by adding just one and two hours to the
> stamp... which made no difference... but when I added 86400 to the stam
Hi UberGoober,
Thanks for your (unique) reply.
Specifically: am playing with web pages/link continuity checking and
suchlike. So HTTP; as an improvement over the facilities offered by fopen().
Have worked through the readme examples, and dived into the script's code,
as you would expect. Was hopi
Hi John,
You mention that it is a login script and that input is rejected. Is it
rejected when it is initially typed in, or is it reported as rejected when
ensuing pages are served?
Please check the IE on the offending machine. Does it have security settings
that forbid cookies?
Check the ipconf
I agree with Jason, it seems strange to have a command line option (that can
only apply to command line operation) and yet the output be in
browser/non-command line format... However with PHP-CLI 'coming soon', maybe
that sorts things out.
Meantime may I suggest combining the two answers:
php -i
Hi Steve,
Have you solved this already?
If not, when you copied the code between machines was there some effort to
ensure that the 'copy' points to the RDBMS/tbls on the same box/different
box - or does the original box have code that points to tbls on itself, and
the second box have code that run
John,
> > > You mention that it is a login script and that input is rejected. Is
> it
> > > rejected when it is initially typed in, or is it reported as
> rejected
> > when
> > > ensuing pages are served?
> When it's initially typed in.
=do you have multiple 'environments' (eg VHosts or even phys
> > =now let's take a look at the UNIX Epoch. Various
> > 'quotations' have surfaced
> > in this email, and I don't recall that it is well discussed
> > within the PHP
> > manual (it being a UNIX definition after all...). The epoch 'began'
> > 1Jan1970, sure enough (exactly as quoted). HOWEVER it i
Hello khuram,
> Iam new at this mailing list .
=welcome to our happy band!
I have a problem in php
> is that i want to store the images on local hard disk
> that are in email (pop3 account) by runing a php file.
> how can i do that. please help me asap.
=there are a number of classes available
Richard,
> I am parsing a csv file with fgetcsv and the fields are surrounding by
> double quotes, now I am running into a problem periodically that when
there
> are quotes within the value it is treating it like another value instead
of
> the same value.
> Any ideas on how to get around that?
>
>
> > > I have a feeling it's going to work out to be something stupidly
> > > simple... like these problems always do. :)
> > =embarrassingly so! If you're taking this all off a user's say-so,
> then it
> > sounds like an eyeball job to me...
> I never did solve it, but it came down to a weird cooki
Hi Jon,
I think we've seen this discussion on the list before
(so Christopher, check the archives!)
> > I'm wondering if someone has a great source for a master-list
> > of controversial and vulger words that I can use on my site.
> > I would like to pattern match input text against this master-l
ike to 'prove' it. As I say, am probably just barking up the wrong
(Christmas) tree(s). No worries - it's familiar territory!
Thanks for your help,
=dn
> > -Original Message-
> > From: DL Neil [mailto:[EMAIL PROTECTED]]
> > Sent: 10 December 2002 19:52
>
> > if you want a partial list of offensive terms - try looking
> > at the meta keywords on a few porn sites ...
>
> Excellent idea!
> Unfortunately I'd have to explain that to my boss... "No, really, I'm
doing
> some research..."
=guess monopolising the color printer for a whole afternoon would
Jason,
> > there simply is no definitive list of words
> The fact is content filtering does not work without a heavy dose of human
> intervention.
> It is quite shocking that large numbers of well known corporations deploy
> misconfigured content-filtering software which rejects perfectly innocen
i setting php.ini
[mail function]
;For Win32 only
SMTP = hermes.ica.gov.co
sendmail_from = [EMAIL PROTECTED]
=it is impressive to see that the Greeks' messenger has made it all the way
over to Colombia! Wasn't he also held responsible for dealing with people
who were guilty of indiscreet speech
Spam Arrest Sender VerificationYesterday we held an amusing discussion which
highlighted the futility of using (badly implemented) technological 'solutions' to a
social problem...
Herewith I attach a response received pursuant to a list contribution. Does this
'gentleman' seriously expect every
I must be a suspicious character, but I haven't come across Expert Rating
before, nor do I know what Pete's connection with Expert Rating is, so I
went and looked at the PHP web site (where we are led to believe that we
would expect to find "a lot of excitement") but a site-wide search fails to
yie
Colin,
> I have a similar problem. I am trying to figure out which of two dates
> is greater. Both are in the -mm-dd format. Is there any easy
> function that allows this sort of comparison or am I missing something?
Treat the dates as strings not numbers:
$DateOne = "2002-12-13";
$DateTw
Andy,
> I am a PHP beginner so this error may be a stupid one. Anyway, I'm
> trying to write a simple addition script. The client enters two numbers,
> then my script (adder.php) adds them. However, when the script is run, I
> get "Parse Error On Line 3" I have no idea exactly what I have done wro
Rolf,
> > the document_root just doesn't show up in my phpinfo();
> >
> > do windows machines have one anyway?
> > I have used this var before, just not testing it locally.
> >
> > It normally shows up when I use phpifno on the server.
Please check/compare the entries for doc_root = in the two P
JJ,
> i have this code snippet:
>
> if(isset($_POST['save'])){
> $query = 'INSERT INTO article_data VALUES (\'\', '.$_SESSION['uid'].',
> '.time().', \''.$_POST['title'].'\', \''.$_POST['description'].'\',
> '.$_POST['cat'].', \''.$_POST['text'].'\', 0)';
> $result = mysql_query($query) or
Tyler,
> If I have a field in my DB that can have 4 different answers, lets say
a,b,c
> and d. How can I count the number of each in that field. So if there are 4
> a's 1 b 0 c's and 12 d's how can I get php to count this?
You must combine IF() with SUM().
Break it down into smaller problems:
Now then, let's all play nicely together!
Dan: relevance
It is a PHP question because whereas the SQL query SELECT fred FROM tbl
produces an array element back in PHP such as $row[ "fred" ], this
convention/mapping comes well unstuck if you submit something like SELECT IF
( answer = 'a', TRUE, FA
Alternatively Alexander,
take a look at the string functions eg strstr(), stristr(), and strpos() all
of which can be used to make a condition within the case() criteria.
Regards,
=dn
> [snip]
> Say i have a variable $string_var = "Once upon a time";
>
> is there a way to do this:
>
> Switch($st
Hi Djurovski,
> I use this query to input data into MySQL DB.
> EXPIRE is Expire Date!
> My script allways inputs "1.1.0001" into database (as value of expire).
> what is wrong?
>
> My table:
>
> CREATE TABLE korpa (
>idnarudzbeukorpi int(255) DEFAULT '0' NOT NULL auto_increment,
>merna
Hi Monte,
> Hi, I have a question about fgets(), it seems to pick up an extra line
> at the end of a text file.
...
> 8\n
...
> Here is the output (showing newlines as \n):
> buffer is 1\n
> buffer is 2\n
> buffer is 3\n
> buffer is 4\n
> buffer is 5\n
> buffer is 6\n
> buffer is 7\n
> buffer is
Hi Roman,
> But on those phpbuilder's page there are also similar questions but
answered
> scripts don't work, for example:
> ...
> preg_match_all("|href=\"?([^\"' >]+)|i(+[ >])", $text,$ar);
>...
> I really don't know :(
There's definitely something wrong with the RegEx above. The string
comme
Tony,
> How would I go about selecting rows from a MySQL table where the first
> letter of a certain field is $letter ?
Depends upon the MySQL tbl's schema.
The MySQL online manual discusses wildcards (full text).
Alternatively see LEFT() and other string functions that can be used in
SELECT an
Mike,
What are the character codes of the last few bytes in the string?
Please advise,
=dn
- Original Message -
From: "Mike At Spy" <[EMAIL PROTECTED]>
To: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 1:36 PM
Subject: RE: [PHP] Agh! trim (#
Scott (confirming Bogdan),
Libraries of all types have had this concern for years - even though books
are uniquely identified by ISBN, that is still not good enough for library
purposes (eg multiple copies of a single title). So they, exactly as Bogdan
suggests, use an "Accession" number sequence
hanks for your input.
>
> Regards
>
> -Scott
>
> > -Original Message-
> > From: DL Neil [mailto:[EMAIL PROTECTED]]
> > Sent: 21 August 2002 04:31
> > To: [EMAIL PROTECTED]; Bogdan Stancescu
> > Subject: Re: [PHP] Image library
> >
> >
> Is it just me having network connectivity problems, or is the PHP website,
> http://www.php.net down? I tried connecting to it from a couple of
> difference computers and I can't access it on any of them. Just wondering
> if anyone else is having problems getting to their website too.
Adam,
General advice:
take a look in the bottom right corner of any manual page and call for the
mirrors list - it's worth bookmarking/favoriting a couple, just in case one
goes down.
Also FYI, mirror sites are often faster (depending upon relative locations)
and their use certainly frees bandwidth at
> Having a large number of files in a single directory does affect
performance,
> the degree of which depends on the filesystem.
This is generally accepted wisdom for dealing with large numbers of files -
but what number is considered "large"?
Any rules of thumb, for different OpSys/file systems
Hello Mike,
parse a string similar
> to "4,31m)" figure out if it is numeric or not, then if it is remove the
> last to characters on the string (the 'm)') and change the string so
> that it is 4.31. There is probably a better way of doing this but I
> can't figure out how to make it better or mo
Philip,
What about "SoftwareVersion Thingy"?
Won't that end up as "Software Version Thingy" - with two spaces before the
"T"?
Can the RegEx be 'turned off' if the u/case letter is already preceded by a
space?
(sorry, may not be Hessu's requirement = my curiosity)
Regards,
=dn
> This works.
>
>
, and now I have the problem to solve. So i back to old
question
> :-)
> How can I search with some precision in a serialized string?
>
>
>
> on 8/24/02 12:13 PM, DL Neil at [EMAIL PROTECTED] wrote:
>
> > Rodrigo,
> >
> > Then the question to be asked is: is seri
to skill level
>
> 1b no separator it's stored as array. The array generated by language[]
and
> skill[] are stored into another array, serialized and put into DB
>
> 2 yes. could be up to 5
>
> 2b again, none. only the array structure
>
> the field is a text.
>
>
>
> I'm trying to get an apostrophe (and a dash, as well) to be
> included in a preg_match expression, but I don't know how to escape the
> characters.
The manual discusses which characters need escaping and how to escape
characters: http://www.php.net/manual/en/pcre.pattern.syntax.php
> if (preg
Hi Ryan,
Anyway, I installed PHPTriad first but since the version of php is 4.0.0 I
uninstalled it and installed SpaceServer...the problem I noticed with both
was I could not get the default page from apache with http://localhost/ I
have to use http://127.0.0.1 or it gives me a page not found err
Hi Rick
Check out list archives for last week (and the week before...) keyword:
resolution.
Also check out HTML, which will cheerfully slap text and graphics together
an adapt to local peculiarities.
Regards,
=dn
> I've seen similar questions in archives so sorry if I'm asking the same
thing
P there's usually a way...
=throw 'escape database' (apostrophe will work too) at the PHP manual's
search facility (the manual is really v.good!) and it will respond with a
reference to ADDSLASHES(), which will do as you ask - there is also a
reference to a PG function (I'
Carlos,
I'm sorry, but am just leaving... If you check the PCRE RegEx pages of the
annotated manual, there are contributed examples that will help in this
situation (probably under preg_match_all() )
Regards,
=dn
> This may be an interesting challenge for someone or has it been done
> before
>
Timo,
If you use func_num_args() to ascertain the number of arguments passed to
the function and func_get_arg() to retrieve each argument in turn (from a
list of unstated length), will that do the trick?
Regards,
=dn
> I've created (with help from some code from the site) a function to make
>
Brian,
Please be aware that many email clients will NOT read HTML. The human
readers are then presented with raw HTML and get very <...?...> upset about
it! (that's why list postings are not supposed to be in HTML/rich text
format)
Regards,
=dn
> It's a text-based newsletter...
>
> I have a s
John,
This is the output:
Resource id #15
or some other seemingly arbitrary Resource ID number?
First of all what is a resource ID and second how do I get it to actually
show what I am trying to get it to show!
=When MySQL returns data to PHP, the information is put into a variable
called a "re
Liam,
If you were to stristr()/remove everything up to and including the
tag, would that take care of things?
=dn
> I've got a lil problem with HTML tags. Here's the description.
>
> My site accepts HTML files by upload. A lot of these files are written in
MS
> Word and then saved as HTML files
> Hi Guys / gals,
>
> I ran a test recently sending emails to a list of clients (1000 or so)
> from a PHP / MySQL powered system.
> When sending via Sendmail this was VERY slow, taking several minutes to
> complete.
> When I switched over to Qmail the whole process takes only 10 or 15
> seconds.
>
Open source campaigners and 'evangelists' may be interested in BBC coverage
of a report by the Commission on Intellectual Property Rights (CIPR):
http://news.bbc.co.uk/1/hi/sci/tech/2253270.stm. It talks of medical,
agricultural, industrial, and IT/educational disadvantages placed in front
of the
Helen,
> I would like to create a web page which allow people to browse the
directory structure and the files listed in every directory. If you have
experience about that, could you kindly give me some advice or references?
Thanks in advance.
=To this simple boy it seems like a strange, even a p
JohnMeyer
> if (is_uploaded_file($_FILES["imagefile"]["tmp_name"]) &&
> ($_FILES["imagefile"]["type"] != "image/jpeg" &&
> $_FILES["imagefile"]["type"] != "image/gif" &&
$_FILES["imagefile"]["type"]
> != "image/jpg" && $_FILES["imagefile"]["type"] != "image/png"))
>
> I'm trying to weed out everyt
> On Thursday 21 November 2002 03:53, Mr. BuNgL3 wrote:
> > Hi...
> > I'm with a little sintax problem...
> > The question is that i have two search fields (titulotxt and cdstxt) and
i
> > want to create an mysql condition... i trying:
> >
> > $sql1=($titulotxt) ? "titulo like '%".$titulotxt."%'":
Rodrigo,
Is there a way to convert a date " 20/11/2002 " to a Float number in PHP,
since the date starts in 30/12/1899, just like the delphi treats the
dates
=Check out UNIX timestamps (but watch the valid date range),
=dn
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
Welcome Nicolas,
=You didn't actually say what the problem was!
=Some have made suggestions, please also consider (below):
i'm new and i'm trouble with this code :'( can U help me please ??
this is the code :
while ($cd_tbl = mysql_fetch_array ($result))
{
$cd_id = $cd_tbl['cd_id'];
$cd_oeuvre
Liam,
Not altogether happy with the suggestion below. It works - for now.
A more generic solution might be to replace the hard-coded "9" with a call
to strrchr() on the last 'dot' character position (minus one). Then it
should work on any properly formed IP address.
Thereafter parameterise the su
Hey Steve,
> Im need to generate an email and Im trying to keep the exact spacing
> I use when I define the body of the email. When the email is sent and i
> view it with Outlick Express or simply use Pine, the spacing is all out
> of wack. (Too many spaces here, not enough spaces there)
>
> I
Hi Sander,
> I made a database with bookmarks, these bookmarks are catogarized by
> type.
> Now I want to display those bookmarks in tables by category. This works
> already fine.
> The only problem I have is that the tables are very difficult to handle.
>
> I want to make 4 tables in a row (so
CJ,
> i have a problem using the mail function on my server.
> win2000 Pro
> IIS 5.0
> PHP Version 4.0.6
>
> i'm not sure if it's a configuration problem with IIS or i'm missing
> something in the php.ini file.
The pre-requisite is that the php.ini file points to a visible SMTP server. Pl
RE: [PHP] counting with dates (help!)Hi Sander,
(and Chris, and Martin)
> $today = date("Ymd", mktime(0,0,0, date(m),date(d),date(Y)));
> $last_week = date("Ymd", mktime(0,0,0, date(m),date(d)-7,date(Y)));
> echo ($today - $last_week);
> The result is a number like 8876 (20020107-20011231 = 8876)
Brian,
> first off, Martin your suggestion looks great but I don't think its SQL
> syntax is supported by MySQL. It's a good start though - gives me something
> to work with :)
=until it is tried, you won't know! From an SQL point of view it looks ok. In fairness
to Martin, from the
'further in
Erik,
Two suggestions:
1 check out mysql_fetch_assoc(), and
2 make use of AS to 'set' the variable names (carried through from MySQL to PHP).
Regards,
=dn
- Original Message -
From: "Erik Price" <[EMAIL PROTECTED]>
To: "Rick Emery" <[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]>
Sent: 1
Or checkout the sql import facilities offered by your choice of database to 'convert'
the data from log to
db-tbl, then set up your analysis in PHP+SQL separately.
=dn
- Original Message -
From: "Martin Wickman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 11 January 2002 09:08
Subj
Yes, I thought about that. But, what should I do when the markers are absolutely NOT
in any sequence.
=sequence would matter if it was possible that one of the markers could replace some
text and that replacement
subsequently became the marker for a further replacement ... nightmare=recursion!
Marvin,
> I'm using the PHP date() function on my site, but since my hosting company
> (Pair Networks) is on the East Coast and I'm on the West Coast, everything
> shows as three hours later (for most of my visitors, anyway). Pair tells me
> there's no setting I can make on my account to change t
Rasmus,
I have held several datetime-related conversations with people recently, and another
series about 'when'/whether
to use PHP or MySQL functionality.
Here you are, "the man" of PHP, advising Sander to use MySQL functionality! (and in
marked contrast to the
(biased) advice one might expec
Alexis,
> Could anybody confirm exactly which characters, if any, are NOT valid in an
> email address.
=such rules of the Internet are laid out in documents called "RFC"s (initially they
are "Requests for Comment"
but once adopted become ...) You are looking for RFC822 (although there are othe
1 - 100 of 280 matches
Mail list logo