Or depending on your budget, Switch the developers to Macintosh
computers, install windows via parallels, and then you can test in
Mac/Unix/Windows all from 1 computer :)
And watch everyone quit... :-)
--
Richard Heyes
++
| Access SSH with a Windows
as an SSH account).
http://www.phpguru.org/sftpdrive
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing List (http://www.ph
anything and the second part must be only in
the set described above.
What is the easiest way to do this?
There's something here, imaginatively called blah(), which does what you
require:
http://www.phpguru.org/preg/example.phps
--
Richard Heyes
++
| A
Check out: http://pecl.php.net/package/threads
That might help you out.
> Summary: experimental implementation of threads
The word "experimental" makes me shudder. If you can (ie you're using
*nix), you could also investigate the pcntl extension - http://php.net/pcntl
Dotan Cohen wrote:
2008/5/14 Richard Heyes <[EMAIL PROTECTED]>:
Any host that upgrades the PHP version (a major upgrade considering it
would be 5 - 6) without notifying Customers isn't a very good hosting
company, and you really should change to a better one (Rackspace are good).
;s not even out yet in beta and therefore not worth my time
considering. ISTR having read something about a 5.3 release, which I
read would have namespaces. That needs consideration before any PHP6
release.
--
Richard Heyes
++
| Access SSH with a W
Jim Lucas wrote:
Richard Heyes wrote:
Also you can use short tags (popular...) to make the HTML more
readable. Eg:
It also makes the code less portable.
If that's even a concern. A lot of the time, it's not.
--
Richard Heyes
+
a variable is just
whitespace.
$comments = trim($_POST['comments']);
if ($comments == '') {
// Show error message
}
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
+---
i)" gaves the following error: usort()
[function.usort]: Invalid comparison function
i tried to do "usort($this->arr, 'cmpi')" but it does not work either.
If it's anything like other functions, try this:
usort($this->arr, array($this, 'cmpi'));
Well, when I try date('d/m/y', strtotime($_POST('date')) - it seems
mixing day and month, I tried setlocale(LC_ALL, 'en_GB'); but it didn't
strtotime() returns a unix timestamp (ie number of seconds since
1970ish. Nothing to do with
Ho to read date from HTML form ->
How to read $_POST['date']="dd/mm/" string variable as a date?
If you want a unix timestamp then try investigating strtotime().
--
Richard Heyes
++
| Access SSH with a Windows m
It won't work?
No idea, it was just a rather poor play on words.
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing List
Perhaps touch might help.
Touch my ass.
ROFLMAO
(I've been waiting for years to use that one)
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
-
validate the attachments and do not rely on the MIME-type
only. People can spoof that kind of files.
There's also the PEAR mimeDecode class as well. A PHP solution so it
won't require you to reconfigure/compile anything.
--
Richard Heyes
++
|
Then surely "designed well" would include a normalised database?
Not necessarily. You could for example have a database that accommodates
future needs without being completely normalised.
--
Richard Heyes
++
| Access SSH with a Windows ma
on the tail of a snake.
Alternatively you make a solution that fulfils the requirements of the
customer, without being "cheap and cheerful" and is designed well to
accomodate future modifications, and make it resolutely clear that any
future modification may take longer since schema changes ma
> | na_acid | na_foo |
+-++
How's that for ASCII art? :-)
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing List (http://www.php
ion and never try to
expand it, chances are you don't need to, so what's the advantage in
throwing it away and generating work for yourself in reproducing it?
--
Richard Heyes
++
| Access SSH with a Wi
chore to maintain I
suppose (which you could say, is more than one...).
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing List (htt
ating data (too much), but shouldn't be a requirement.
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing List (http://www.php.n
Tony Marston wrote:
"Richard Heyes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
The database must be properly normalised otherwise it
will be difficult to get at the data you need in an efficient manner.
Not true. If your needs are simple for example, normalisat
ple you could use something like a SET type,
and search for something in it using FIND_IN_SET().
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
.
There's also a shortcut function for just matching an Interweb email
address.
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing
that could be removed by using AJAX to drag down the latest page instead
of refreshing the whole page.
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
IRC server).
http://www.phpguru.org/chat/chat.php
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
se. Eg.
$obj = new ErrorHandlingObject();
set_error_handler(array($obj, 'myMethod'));
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing
y it's more flexible...?
The latter two solutions I suggested are certainly easier to work with
and (with todays hardware), speed isn't always a factor.
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|ht
function FIND_IN_SET() will be very useful.
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing List (http://www.php.net/)
To unsu
i dont really see how that gets him the answer without at least checking the
number of elements in the array after filtering it w/ array_filter; which if
he wanted to reuse in several places would make sense to write a simple
function for anyway..
Yes, on both counts.
--
Richard Heyes
but I was thinking if there is the function does that.
array_filter(). Note this:
"If no callback is supplied, all entries of input equal to FALSE (see
converting to boolean) will be removed."
http://uk3.php.net/manual/en/function.array-filter.php
--
Ric
;framework".
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The commute would be a killer, Richard. LOL.
I think you're right. A 60 mile commute caused me to quit a job, so
several thousand miles sounds excessive... :-)
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpgur
Web 2.0 *and* profitable? Surprising.
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
fixed now
though because it was some time ago. But that doesn't mean to say more
won't be found.
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
I don't believe malicious code can be executed with echo and header.
The header of the PNG file, not a HTTP header.
--
Richard Heyes
++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftp
are an IP with a few hundred other people so that all
of them combined only get counted one time.
Because of this if it's not too important (eg it's just ratings of
articles) personally I would choose the cookie method. If it's uber
important you could have the user login before they
And since no word in the English language begins with FT
You're forgetting Ftork...
--
Richard Heyes
+-+
|Access SSH through a Windows mapped drive|
|http://www.phpguru.org/sftpdrive |
+-+
--
PHP Ge
> SASH
That should have been SSH of course - seems my spell checker isn't very
technical...
--
Richard Heyes
+-+
|Access SSH through a Windows mapped drive|
|http://www.phpguru.org/sftpdrive |
+-+
it take me 5 minutes :)
For the record, it was exactly five minutes.
What was?
--
Richard Heyes
+-+
|Access SASH through a Windows mapped drive|
|http://www.phpguru.org/sftpdrive |
+-+
--
PHP General M
reattached it for him... :-)
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
egister_globals crapola).
Credit also due to Stephan Esser.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ball park?
Hopefully it makes sense... Cause it's right on the edge of my knowledge
so I'm not totally sure how to ask it right yet :)
You could do it adequately with a DESCRIBE, but there might be something
that's "better". I would suggest looking through the code
this is to you), the quickest to implement would be a
combination of serialize(), unserialize(), file_put_contents() and
file_get_contents().
Using these functions you could very quickly create a persistent cache
for data. It might be quicker though to use a cache that's already out
there.
n't really take any more
time.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to
take advantage of other functions like ceil, floor etc.
So the string "18-10" should give me 8, "ceil(1/2)*10" should be 10 (if
my maths is correct) and the string "18-10;\r\nunlink('/var/www/*');"
should not execute.
If you can provide your users with d
to unserialize data ?
The question(s) should be "Why would you want PHP4 to read a PHP5
session?" and "Why would you expect it to work?". If you want to
transfer data between versions you may want to investigate XMLRPC. Or
perhaps the somewhat more verbose SOAP.
--
Ric
, otherwise you will encounter problems. Or
alternatively use __autoload() to allow the class code to be loaded when
you start the session.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
line, so you can use this
wondrous fact to seek to a specific line:
It works because fgets() stops when it encounters a newline (\n). So
it's just a case of counting the calls to fgets().
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www
s for Javascript.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
;d have the code to show listings. With common code on the
parent movie listings class and with specific code on the appropriate
child class.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
err-um sorry for the noise; actually the namespaces work w/ functions as
well.
So not OO specific? Is there anything I can read that describes them?
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Playing around with dev PHP 5.3 and namespaces
PHP 5.3 will have namespaces?
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hey,
As the subject says really. Last thing it has seems to be "PEAR on a
Shared Host" dated the start of the 27th.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
xt, $matches);
$main = preg_match('/(.*)/is',
$text, $matches);
And then, IIRC, the content you're after will be in $matches[1].
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
gt;array('type'=>'da'),2=>array('type'=>'da'))
Off the top of my head:
$v) {
if (!empty($v['type']) AND $v['type'] != 'da') {
unset($newDataArray[$k]);
}
}
?>
Optionally, you coul
with this separately.
Is there a better way than simply sending a test email to see if it
bounces?
The Mail/RFC822 class in PEAR has a quick(er) static method for checking
the format of an Interweb email address.
Mail_RFC822::isValidInetAddress()
IIRC
--
Richard Heyes
Employ me:
http:/
oot directory or specific directories.
If you put that in .htaccess file, it will apply to that directory and
any subdirectories.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
at count_chars and considered writing a wrapper
function for each of the 27 letters of the Hebrew alphabet, but I am
quite sure that there is a cleverer method. Any ideas?
You may want to investigate mb_strlen():
http://uk.php.net/mb_strlen
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
terms that
grant you permission to use and redistribute the software. If you add to
it, it stops being the GPL.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ainst the gpl software.
he want me to remove all the link and powered by link (anything visible to
the end user)
Which you can do (IIRC).
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
when
complete redirects to the "thank you" page. ie.
Form --> "Please wait..." page --> "Thank you" page
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
a / are taken to be relative to the current
documents path. You (probably) want this:
The forward slash at the start causes your browser to ignore whatever
your current path is, albeit remain on the current domain.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP Genera
LF'] which will give you the path to the
script or $_SERVER['REQUEST_URI'] (you will probably have to remove the
query string with this), along with either dirname().
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscr
anual/en/language.oop5.magic.php
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
$authenticated = "TRUE";
Like above, I would advise using booleans (true/false) and not strings
(text):
$authenticated = true; // Note the lack of quote marks
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
r variable.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Oh and Stephane: this is a mailing list. If you want off you can go to
http://www.php.net.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/manual/en/function.set-error-handler.php
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Greg Donald wrote:
On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
That's not quite the situation. Finding good developers isn't easy, so
lots of companies will go for "acceptable" ones, who are less likely to
know of __autoloads existence. Hence, using __auto
know of __autoloads existence. Hence, using __autoload is unwise.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t's a perfectly viable business reason.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
about error handling.
Aren't they all? :-/
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
xample a junior developer who doesn't know of its existence and is
new to a job is less likely to admit ignorance and ask how a class is
being defined when __autoload() is being used.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsu
,
including whitespace.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> A stroke less than two weeks before your twenty-ninth birthday.
Five months. Close though... :-)
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
...which is kinda funny b/c right here he says to "Employ me". Not with
double typos like that, Mr.!! =D
Oopsy. Sight is a funny thing...
http://www.phpguru.org/article.php/102
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.ph
hard drive and store the file
name in the database. If for whatever reason you can't or don't want to
do that, then at least store it in a separate table that only gets
touched when the image is requested.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing
> /etch/hosts
Typo. That should be:
/etch/hosts
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
up your hosts
file (typically /etch/hosts on *nix,
c:\windows\system32\drivers\etc\hosts on Windows) and add a line that reads:
127.0.0.1 www.foo.com
That way your PC (only your PC) will think that www.foo.com is local,
and not go over the Interweb for it.
--
Richard Heyes
Employ me:
http
er is 4022.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
o you
may be better off with a single file while you get it up and running.
Something like Console_Table. So, you would create this dir:
/usr/local/share/pear/Console and in that place the file Table.php
Then in your app you can do this:
require_once('Console/Table.php');
-
So, my question is how would I do that, and I strongly suspect if it's
possible at all an .htaccess file with the proper entries would be the
way to do it, not using PHP code to redirect as I am now.
Is this the case?
You would need to use mod_rewrite.
--
Richard Heyes
Employ me:
ript
2. Use the Apache directive to make it be parsed as a PHP script
(http://www.phpguru.org/article.php/212)
3. Then in the "user" file you can use the $_SERVER['REQUEST_URI']
to ascertain the correct content to show.
--
Richard Heyes (wondering if he's getting a
// String short enough already ?
if (strlen($str) <= $length) {
return $str;
}
$str = substr($str, 0, $length);
// No body intentionally
for ($i=$length - 1; !ctype_space($str{$i}) && $i > 0; --$i);
return rtrim(substr($str,
and is_readable for some basic
checking, and hope that the included files have no syntax errors.
Hoping something works leads you down the path of severely broken code.
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
echo
"".$myrow["char_name"]."".$myrow["char_level"]."".$class["class"]."".$myrow["kara"]."".$myrow["karateam"]."".$myrow["karasub"];
Either CSS styling or th
u're on Windows you'll need someone else... :-)
--
Richard Heyes
Employ me:
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, Rob, that function doesn't return anything. ;-)
It's not meant to:
--
Richard Heyes
Employ me (!):
http://www.phpguru.org/cv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What design patterns do you usually use?
Whatever solves the problem. Factory is quite a common one. MVC is another.
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
essage, 'Content-Type:
text/html');
If you want to send multipart text/HTML emails, have a look at my
website for the HTMLMimeMail class which greatly simplifies this.
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
--
PHP General Mailing List (http://www.php.net/)
I think this is a highly underused built-in
feature.
Agreed. I started to use it on my blog instead of a query string and
pages reported by Google went up.
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
create file eg cron.txt
Or if your version of crontab supports it (not all do) then you can use:
crontab -e
And to get the manual page, you can do this:
man 5 crontab
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
--
PHP General Mailing List (http://www.php.net/)
To
like this:
/rental.php/property/23425
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
$start_date = date("Y-m-d h:i:s", strtotime($date_format));
echo $start_date;
?>
output is 2008-02-22 02:00:00
but not 2008-02-22 14:00:00
How can i get my output as 2008-02-22 14:00:00.
Use H instead of h. And try the manual.
--
Richard Heyes
http://www.phpguru.org
Free PHP a
ou honestly not use mod_rewrite in anything you've made?
No.
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
r htdocs called /profile/adam and in that place a
default document redirecting. Still no need for mod_rewrite. Unless of
course you want the url to remain in the addressbar, but personally I
don't think that is as important as what the user has to type in initially.
--
Richard Heyes
http://www.
/login The trailing slash is
not necessary if login is a directory. For example:
http://www.websupportsolutions.co.uk/demo
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Spider webs have existed for many a year...
Not long before the eggs hatched.
Debatable.
--
Richard Heyes
http://www.websupportsolutions.co.uk
Knowledge Base and Helpdesk software hosted for you - no
installation, no maintenance, new features automatic and free
--
PHP General Mailing
st time you saw porn on one of them?!!
Now that would be telling. :-)
--
Richard Heyes
http://www.websupportsolutions.co.uk
Knowledge Base and Helpdesk software hosted for you - no
installation, no maintenance, new features automatic and free
--
PHP General Mailing List (http://www.php.net/)
"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.
Spider webs have existed for many a year...
--
Ric
501 - 600 of 879 matches
Mail list logo