Nathan Nobbe wrote:
On Jan 30, 2008 10:46 AM, Stut <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Nathan Nobbe wrote:
Actually no, I mean I would *just* use a static method. If there is no
reason to instantiate an object, why would you? <http://stut.net/>
to instantiate an object, why would you?
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Nathan Nobbe wrote:
On Jan 30, 2008 10:53 AM, Stut <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Nathan Nobbe wrote:
I never said I wasn't creating
an instance in the example I posted.
then what exactly did you mean by this?
Actually no, I mean I w
Jim Lucas wrote:
Stut wrote:
Nathan Nobbe wrote:
On Jan 30, 2008 10:53 AM, Stut <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Nathan Nobbe wrote:
I never said I wasn't creating
an instance in the example I posted.
then what exactly did you mean by this
Nathan Nobbe wrote:
On Jan 30, 2008 11:21 AM, Stut <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Calling a static method
does not create an instance of the class.
there you go again; calling a static method does create an instance of
the class if you call new ins
Nathan Nobbe wrote:
On Jan 30, 2008 11:31 AM, Stut <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
"I would *just* use a static method"
*just* *just* *just* *just* *just* *just* *just* *just* *just*
No instance. None. Grrr.
here is a mod of th
Nathan Nobbe wrote:
On Jan 30, 2008 11:58 AM, Stut <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Ok, I'm going to have to assume you really are as stupid as you seem. If
I need to provide an example to demonstrate what I meant I will, but I
feel I made it
Jim Lucas wrote:
Stut wrote:
Nathan Nobbe wrote:
On Jan 30, 2008 11:31 AM, Stut <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
"I would *just* use a static method"
*just* *just* *just* *just* *just* *just* *just* *just* *just*
No instance. None. Gr
ter, you'll have fans and harddisks
pop every so often, but I have my doubts about memcached scaling to
that level (please correct me if I'm wrong here, I have _no_ experience
with memcached).
Facebook. Digg. LiveJournal. That enough scalability proof for ya? If
not there are plenty
27;t have that kind of
access either change hosts or look at poking the message into an
outgoing queue you implement yourself (file or db-based with a cron job
to periodically process it).
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
but you're free to take whatever
risks you want with your servers and clients.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Per Jessen wrote:
Stut wrote:
Per Jessen wrote:
Eric Butera wrote:
You should never use exec & friends when there is another way around
the problem. It is a security concern.
Why is it a security concern to execute another bit of code?
I really fail to see any security concern in d
27;re using Outlook. It has an annoying feature where it
"helpfully" removes "extra" line breaks. This would appear to be what's
happening here.
When it does this it usually displays a notice somewhere to say it's
done this and offers a way to undo it.
-Stut
Per Jessen wrote:
Stut wrote:
Of course, processing power, network capacity and memory are all very
cheap these days, so it's easy to put on the Microsoft hat and be
wasteful.
In my mind you're exchanging traffic over a local network (probably
1Gbps) for a less resilient load balanc
Per Jessen wrote:
Stut wrote:
There's no question of locking users to particular machines, nor of
uneven distribution. LVS will distribute evenly or according to
weights.
Indeed, but you must see that making the decision of which server to
use per request will result in a more
Per Jessen wrote:
Stut wrote:
Per Jessen wrote:
mike wrote:
Check out persistency in LVS for instance:
http://www.linuxvirtualserver.org/docs/persistence.html
i know persistence handling is an option in LVS, but i haven't seen
the need to use it. i use LVS right now without even both
Sancar Saran wrote:
Hello
On Tuesday 12 February 2008 13:39:19 Stut wrote:
I'll be using memcache as a simple cache. I hate sessions and avoid them
for anything but the most trivial sites. The main sites I work with no
longer use sessions because they add a pointless layer of complexity t
e tool for creating a logical modular
system with reusable components, and IMHO not using them indicates an
engineer stuck in the dark ages of software development.
But each to their own.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://w
ical sense and most of those involve web-based DB admin such as
phpMyAdmin. You might want to rethink your design from a security point
of view.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Lynch wrote:
On Thu, February 14, 2008 4:28 pm, Stut wrote:
Richard Lynch wrote:
If a website is complicated enough to need a class hierarchy, then
something is wrong in your Design. :-) :-) :-)
I don't think anything ever *needs* a class heirarchy, but I wouldn't
say
se help me...
Questions regarding specific frameworks should be directed towards the
support resources for that framework. Check the Cake homepage for
support details.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You should be able to put in your own XSLT that ensures the XML file is
presented unchanged. Dunno if IE7 will obey it but certainly worth a try.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Petrus Bastos wrote:
I'm testing on FreeBSD. I can use any command through system(), but the zip
command doesn't works! I don't know why.
Is zip installed? AFAIK it's not by default.
Do a system('whereis zip'); to see.
-Stut
--
http://stut.net/
--
eas?
Show us some code. Chances are that you're blatting over the
$myClassInstance variable, or are running into scope issues.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
at's gives you the full output and
not just the last line. I tend to use backticks for this. It would also
help to add 2>&1 to the end of the command so you get output to stderr
as well as stdout.
Finally, if it's still not working might I suggest you share your code.
The probl
t found" which probably means
PHP doesn't have execute permissions on the zip binary. There could be
lots of reasons for that but you need to ask your sysadmin about it.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e for that function - it will tell you how to detect
errors.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
failed? It's pretty-much always a case of file not found or
insufficient permissions, both of which you can check for before going
near fopen.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to destroy objects when
calling method free() but obviously I can't.
I don't understand why you need to destroy the class instance to clear
up member variables. Or am I not understanding your diction?
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
in Name System.
"A form" of the web existing long before that depending on your
definition of the web. To me it's a way for people to share information.
That would cover the BBS world which pre-dates LANs by some distance.
Anyhoo, back to work.
-Stut
--
http://stut.net/
--
PHP
h, but when was the last time you saw porn on one of them?!!
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e memory limit is the worst possible solution to this
"problem".
It's a giant file, and your regex is basically pulling out each line.
For the love of $DEITY learn about fgets and process each line one by
one rather than loading in the whole file. It'll be a lot faster and
On 25 Feb 2008, at 18:40, Rick Pasotto wrote:
What is the best or recomended proceedure for making sure that a
page is
accessed only via a secure connection?
What web server are you using? In my experience this is best done
there rather than in PHP.
-Stut
--
http://stut.net/
--
PHP
nt "Joomla" name:
http://search.securityfocus.com/swsearch?query=joomla&metaname=alldoc
And the 280+ exploits when it was called "Mambo":
http://search.securityfocus.com/swsearch?query=mambo&metaname=alldoc
Not disagreeing with you, but just to be clear Jooml
nning it through Visual Studio in debug mode which instruments
the code to such a degree that it's several magnitudes slower than a
release build.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
he proper
groundwork first and explain what you've already done in your post.
In short, learn by doing. It's served me well.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
m
having trouble finding one at the moment. If anyone considers
themselves a software engineer rather than a web developer and would
like a job in Windsor drop me a note.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 27 Feb 2008, at 21:42, Daniel Brown wrote:
On Wed, Feb 27, 2008 at 4:38 PM, Stut <[EMAIL PROTECTED]> wrote:
[snip!]
If anyone considers themselves a software engineer
rather than a web developer and would like a job in
Windsor drop me a note.
Depending on how desperate you get,
On 27 Feb 2008, at 21:50, Shawn McKenzie wrote:
Shawn McKenzie wrote:
Stut wrote:
I've interviewed more than my fair share of "web developers" who
couldn't reverse an array without using array_reverse if their life
depended on it. Sometimes it really does scare me!
So m
ray should be sufficient in this case.
Replace your two return statements with the following...
return array($table, $authenticated);
Then call the function like this...
list($table, $authenticated) = authentication(blah, blah, blah);
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 27 Feb 2008, at 23:25, Jochem Maas wrote:
Stut schreef:
I DID NOT!! It was him! I only schreef in private!
On 27 Feb 2008, at 20:59, Daniel Brown wrote:
So let this be at least a basic retort to those who don't consider
web development "real programming." Because you
t that over any bit of paper.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the shebang line that *may*
be present in the included script from being output to stdout.
On my local machine here PHP does not output the shebang line. AFAIK
it detects and strips it at the compilation phase. Have you tried it?
-Stut
--
http://stut.net/
--
PHP General Mailing List (http
On 28 Feb 2008, at 11:40, Aschwin Wesselius wrote:
Stut wrote:
On 28 Feb 2008, at 11:30, Aschwin Wesselius wrote:
Shelley wrote:
Hi all,
What do you think is the best way to display string 'abcdef' as
'fedcba'?
$tmp = '';
$str = 'abcdef';
for ($
o $tmp;
Close, but no cigar. $i should be initialised to strlen($str)-1
otherwise you start one character beyond the end of the string.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
response.
To unsubscribe, visit: http://www.php.net/unsub.php
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ht end up working on your stuff, keep using
spaces. Just hope you never change your mind.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
s
regardless of the language you're using.
Stop adding to the FUD.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
27;cart'] = array('lots', 'of', 'money-making', 'crap');
To "disconnect" the user from one or other simply unset that variable...
unset($_SESSION['members']);
unset($_SESSION['cart']);
KISS.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 2 Mar 2008, at 15:28, Richard wrote:
Stut a écrit :
On 2 Mar 2008, at 14:49, Richard wrote:
I would there for need to have two seperate sessions one for the
cart, and one for the members area. And sometimes I will need to
have them both open.
Is this possible ? I've searched googl
On 2 Mar 2008, at 15:59, Richard wrote:
Stut a écrit :
On 2 Mar 2008, at 15:28, Richard wrote:
However, is there a way to limit the session stay alive time for
just one variable ?
If for example, if a user has not done anything in his members
area for more than 30 minutes I would like to
On 2 Mar 2008, at 16:32, Richard wrote:
Stut a écrit :
Just curious... why are you setting the password to an empty array?
You'd probably be better off unset'ing it so you can use isset to
check for it.
Oh right ! :)
Yes you're right about the array, I used it by mistake,
On 4 Mar 2008, at 14:05, Jay Blanchard wrote:
[snip]
Stut mentioned a little while back that he avoids using the built-in
session
mechanism if at all possible, but still manages to track user
state ...
now I can think of a way or two that he might do that but I was
wondering if
any one could
On 4 Mar 2008, at 16:11, Daniel Brown wrote:
On Tue, Mar 4, 2008 at 11:09 AM, Stut <[EMAIL PROTECTED]> wrote:
On 4 Mar 2008, at 15:52, Daniel Brown wrote:
On Tue, Mar 4, 2008 at 9:10 AM, Stut <[EMAIL PROTECTED]> wrote:
I'm working on an article
for my website that describe
On 4 Mar 2008, at 15:52, Daniel Brown wrote:
On Tue, Mar 4, 2008 at 9:10 AM, Stut <[EMAIL PROTECTED]> wrote:
I'm working on an article
for my website that describes exactly how I'm doing it and what the
issues are but it's not ready yet. I'll let the list know when
d you?
You need to point the "For Win32 only" settings at a mail server on
Windows. The error message pretty clearly states that it's trying to
connect to the server specified in those settings.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
if the manual isn't lying it should work.
Incidentally, it probably didn't like the Yahoo settings you used
because that port is for SMTP over SSL which PHP doesn't support.
-Stut
--
http://stut.net/
- Original Message -
From: "Stut" <[EMAIL PROTECTED]>
was type 'human' into a text box, but since my
blog is not very popular it's not worth the bad guys investing time to
mod their bots to get past it. I had zero spam comments while that was
in place. I've since switched to Wordpress and I have to say that
Akismet kic
On 11 Mar 2008, at 07:09, John Taylor-Johnston wrote:
Any other inspiration?
Assuming the index is a PHP script stick this at the top...
-Stut
--
http://stut.net/
John Taylor-Johnston wrote:
It used to have a feed, by accident.
Now someone munches up too much bandwidth.
http
On 4 Mar 2008, at 13:57, Jochem Maas wrote:
Stut mentioned a little while back that he avoids using the built-in
session
mechanism if at all possible, but still manages to track user
state ... now I
can think of a way or two that he might do that but I was wondering if
any one could give
On 11 Mar 2008, at 13:31, Thiago Pojda wrote:
-Mensagem original-
De: Stut [mailto:[EMAIL PROTECTED]
On 4 Mar 2008, at 13:57, Jochem Maas wrote:
Stut mentioned a little while back that he avoids using the built-in
session
mechanism if at all possible, but still manages to track
On 11 Mar 2008, at 14:26, Zoltán Németh wrote:
2008. 03. 11, kedd keltezéssel 12.34-kor Stut ezt írta:
On 4 Mar 2008, at 13:57, Jochem Maas wrote:
Stut mentioned a little while back that he avoids using the built-in
session
mechanism if at all possible, but still manages to track user
state
hink about what you're actually considering doing
with that script before you go that. A little thought will probably
put you off the idea quickly.
To answer your question... http://marc.info/?l=php-general&r=1&w=2
-Stut
--
http://stut.net/
--
PHP General Mailing List (
th2));
}
8<--
Note that I would like to compare any type of files (text and binary).
http://php.net/md5_file
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
rs might not know
about it is going to restrict you to the sort of instruction set you
get in Assembler. I've been working with PHP for a very long time and
I certainly don't claim to know everything about it or about every
feature it has. Restrict your code in that way and y
ed in plain text on
the users machine. Since that cookie contains an email address and
potentially a phone number it's much better to encrypt it and protect
our users.
Hope that answers your question.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To uns
tedd wrote:
At 4:01 PM + 3/13/08, Stut wrote:
tedd wrote:
Then, when the user returns, you simply check the cookie with what's
stored in the dB and continue as before. If the check fails (no
session id or it has been altered), then start again.
Because that negates the whole poi
tedd wrote:
At 3:16 PM + 3/13/08, Stut wrote:
tedd wrote:
I question the reason why you would want to encrypt the cookie
considering that before the user is going to be provided access to
sensitive data that you require a password confirmation. The
encryption seems to be an unnecessary
but such a beast is pretty simple to write but obviously is
not evaluated at runtime.
IIRC there was a project a while ago to build a macro language into
PHP but I have no idea how far it got. I think it was being done under
the GSoC initiative. Google should have more on that.
-Stut
--
http:
On 14 Mar 2008, at 19:03, Eric Gorr wrote:
Unfortunately, such things cannot be used to wrap functions.
Erm, yes they can. Try it.
Oh, and top-posting is evil, please don't do it.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On 14 Mar 2008, at 19:21, Eric Gorr wrote:
On Mar 14, 2008, at 3:15 PM, Eric Gorr wrote:
On Mar 14, 2008, at 3:10 PM, Stut wrote:
On 14 Mar 2008, at 19:03, Eric Gorr wrote:
Unfortunately, such things cannot be used to wrap functions.
Erm, yes they can. Try it.
Gives:
Parse error
sic
PHP syntax level you need to escape the \...
openssl_pkcs7_verify("prova.p7m", PKCS7_BINARY ,"prova.pdf",
array("c:\\cert.pem") );
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
u.php
page inline rather than bouncing off the client?
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to being exploited by other parties.
Think carefully about whether you actually need to hit that URL
directly all the time or just during development. If it's just during
development it would be better to disable any security features you've
implemented, just make sure you
er from getting the confusing popup and it
means you don't need to track whether a form has been posted yet. If
your application is well-architected you shouldn't need to worry about
performance.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
user reloads that page you'll process the form again,
which could have any number of nasty effects from creating a duplicate
row in the database to charging a credit card again. It also causes a
potentially confusing confirmation request to be displayed to the user.
-Stut
--
http:
On 18 Mar 2008, at 15:33, Per Jessen wrote:
Stut wrote:
One minor thing... a 303 redirect is permanent. In this situation you
want to use a 302 otherwise you could potentially cause problems with
proxies.
A redirect following a POST really should be a 303 - RFC 2616 :
10.3.4 303 See Other
a long time into the future. We use a year on all our images, css
and js files and it's lead to a drop of ~40% in traffic to the static
servers.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 19 Mar 2008, at 10:11, Per Jessen wrote:
Stut wrote:
On 19 Mar 2008, at 09:54, Per Jessen wrote:
BTW, why does the browser do this for objects it has already cached?
(assuming they're fresh/not expired)
Because by default most web servers don't add expiry headers, so it
:'login';
if () { $cmd = ^^^^; } else { $cmd = ^^^; }
Simple as that.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to look at the documentation for the database you're using
or find a mailing list for it.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-nathan
That surprised me as well.
I thought that (*) meant "look up everything" and would have figured
that (id) would have been quicker.
Using count(*) can be optimised, as can count(1) which is what I
usually use. Using a specific field is harder to optimise.
-Stut
--
htt
jeffry s wrote:
what about SELECT MAX(id) FROM table :)
Won't give you the number of records, just the highest ID.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
x27;;"
You can also do this in the onsubmit of the form but you obviously need
to change this to a document.getElementById.
I'd also recommend you put some JS at the end of the page to enable the
button and set its value otherwise users hitting the back button may be
presented with a d
ing the law. Contact the maintainer of the
software to find out if there's a way to get it under a different
license. If not look for an alternative that meets the customers
requirements.
-Stut
[1] Yet to be sufficiently tested in court in most countries, but do you
really want to
ges clearly state is not a valid stream resource.
Please RTFM carefully before asking here, it'll help save both our
sanity and yours!
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Please keep replies on-list so everyone can benefit from the discussion.
On 20 Mar 2008, at 00:13, Mark Weaver wrote:
Stut wrote:
RTFM. The fopen function (http://php.net/fopen) will return a
stream resource. The fwrite (http://php.net/fwrite) and fclose (http://php.net/fclose
- noticing a
tract "trims" too?
No, but you can use http://php.net/array_map to do the trim before
using extract.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 28 Mar 2008, at 21:14, Lamp Lists wrote:
- Original Message
From: Stut <[EMAIL PROTECTED]>
To: Lamp Lists <[EMAIL PROTECTED]>
Cc: php General list
Sent: Friday, March 28, 2008 4:02:27 PM
Subject: Re: [PHP] does function extract() trim?
On 28 Mar 2008, at 20:59, Lamp
ust an example. You can generate the filename in any
way you choose as long as you check for duplicates before using it.
If that's not the reason please explain exactly what you're trying to
achieve rather than how you want to achieve it.
-Stut
--
http://stut.net/
--
PHP General M
?
Works fine here: http://dev.stut.net/php/mario.php
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daniel Brown wrote:
Hey, folks, ignore the coincidence of the date when reading this email.
I'm thinking you're full of it...
http://lxr.php.net/search?string=remote_bytecode_include
Since it doesn't appear in the PHP source code I'm guessing it won't
have any
Daniel Brown wrote:
Off-list.
Hey, don't shoot me down just yet, Mr. Dallas. Gotta' make the
n00bs sweat it out just a bit, y'know. ;-P
Sorry mate, bit too quick on the trigger there.
And less of the real name on the interweb please, I'm undercover!
-Stut
--
h
John Taylor-Johnston wrote:
$name = "John Taylor";
I want to verify if $name contains "john", if yes echo "found";
Cannot remember which to use:
http://ca.php.net/manual/en/ref.strings.php
Either http://php.net/strpos or http://php.net/stripos if your versio
causing the condition to evaluate to
false.
As per the documentation for strpos you should compare the value *and
type* of the variable returned by strpos against false to check for
non-existance.
if (strpos($name, 'John') !== false) { ... }
-Stut
--
http://stut.net/
-M
g the include inside of the
function context. How to go upon this?
In index.php rather than declaring vars like so...
$var = 'value';
...declare them in the $GLOBALS array like so...
$GLOBALS['var'] = 'value';
$var is then in the global scope regardless o
Evert Lammerts wrote:
In index.php rather than declaring vars like so...
$var = 'value';
...declare them in the $GLOBALS array like so...
$GLOBALS['var'] = 'value';
$var is then in the global scope regardless of where it was set.
-Stut
That would work.
f which there are few).
What you're experiencing is probably the effect of the display_errors
configuration option. Look it up in the manual for details.
To the OP: Check that your include_path contains '.', if it doesn't add
it and see if that fixes your problem.
-Stut
, but I always just change them to be on the safe side, but that's just how
I roll...
If you're worried about is use DIRECTORY_SEPARATOR rather than
hard-coding it. Writing portable code is not difficult in PHP.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.
e servers where it worked probably had an implicit buffer configured
thus not caring about output before session_start().
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
401 - 500 of 1370 matches
Mail list logo