...
You could read it progressively using fopen(), fread() et al.
Probably. This would mean only a small amount of data is read by yours
erver at once. Eg:
$rp = fopen('http:www.example.com/title.png', 'r');
$wp = fopen('mylocalfile', 'w');
while ($block = fread($rp, 8192)) { // 8k block size
At 10:58 AM -0700 10/17/08, Lamp Lists wrote:
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said this
is not good:
$search = isset($_GET['search']) ? $_GET['search'] : '';
and this is good:
$search = '';
if
- Original Message
From: tedd [EMAIL PROTECTED]
To: Lamp Lists [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Monday, October 20, 2008 8:25:50 AM
Subject: Re: [PHP] what's the difference in the following code?
At 10:58 AM -0700 10/17/08, Lamp Lists wrote:
I'm reading Essential PHP
At 6:37 AM -0700 10/20/08, Lamp Lists wrote:
- Original Message
From: tedd [EMAIL PROTECTED]
To: Lamp Lists [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Monday, October 20, 2008 8:25:50 AM
Subject: Re: [PHP] what's the difference in the following code?
At 10:58 AM -0700
On Mon, Oct 20, 2008 at 10:02 AM, tedd [EMAIL PROTECTED] wrote:
I hate it when people take things out of context and misquote others. Chris
did not say that one way was better, or different, than the other. But
rather he used two sets of code to illustrate a point.
Welcome back, Grum-pa.
Am 2008-10-17 00:14:18, schrieb Nathan Rixham:
Evening All,
I'd be /really/ interested to know who uses what!
*Procedural or OOP?*
OOP
*Dev OS*
Debian GNU/Linux Etch/Testing/Unstable
*Dev PHP Version*
5.2.0-8+etch10
*Live Server OS*
Debian GNU/Linux Etch
*Live Server PHP
-Original Message-
From: Rene Veerman [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 19, 2008 6:12 AM
To: php-general@lists.php.net
Subject: [PHP] how to start using a version control system
(subversion)?
Apologies for posting a monthly/yearly recurring theme here..
If someone
On Sun, Oct 19, 2008 at 10:34 AM, Martin ZvarĂk [EMAIL PROTECTED] wrote:
Ryan S napsal(a):
Hey,
this the first time I am actually working with tags but it seems quite
popular and am adding it on a clients requests.
By tags I mean something like wordpress' implementation of it, for example
Ok, so why isn't this working as (I, at the very least) expected?
class singleTon
{
private static $thisObj = NULL;
private $thisProp = NULL;
public function __construct()
{
echo 'singleTon::__construct()br';
if( !is_null( singleTon::$thisObj ))
{
echo '$thisObj
Christoph Boget schrieb:
Apart from making the constructor
private, is there any way I can ensure that there is ever only one
instance of an object?
you could use the magic method __clone.
For example:
public function __clone() { trigger_error('The singleton pattern avoids
cloning this
On Mon, Oct 20, 2008 at 1:07 PM, Christoph Boget
[EMAIL PROTECTED] wrote:
Ok, so why isn't this working as (I, at the very least) expected?
class singleTon
{
private static $thisObj = NULL;
private $thisProp = NULL;
public function __construct()
{
echo
Christoph Boget wrote:
Ok, so why isn't this working as (I, at the very least) expected?
class singleTon
{
private static $thisObj = NULL;
private $thisProp = NULL;
public function __construct()
{
echo 'singleTon::__construct()br';
if( !is_null( singleTon::$thisObj ))
Hi
I am looking for a remote developer for small add hoc jobs. Usually only a
few hours at a time. Basic stuff, listing data from SQL and text files.
Mainly work on existing systems.
$10-$15 per hour depending on location.
Andy
Midsoft UK
--
PHP General Mailing List
Apart from making the constructor
private, is there any way I can ensure that there is ever only one
instance of an object?
you could use the magic method __clone.
For example:
public function __clone() { trigger_error('The singleton pattern avoids
cloning this instance', E_USER_ERROR); }
Christoph Boget schrieb:
Apart from making the constructor
private, is there any way I can ensure that there is ever only one
instance of an object?
you could use the magic method __clone.
For example:
public function __clone() { trigger_error('The singleton pattern avoids
cloning this
On 20 Oct 2008, at 18:07, Christoph Boget wrote:
Ok, so why isn't this working as (I, at the very least) expected?
Hmm, where to start...
class singleTon
{
private static $thisObj = NULL;
private $thisProp = NULL;
public function __construct()
A singleton would usually have a
public function __construct()
A singleton would usually have a private constructor to prevent
non-singleton instances.
The problem being if the class in question derives from another class
that has a public constructor... If you are in that particular
situation (which I am), you're
On 20 Oct 2008, at 20:24, Christoph Boget wrote:
public function __construct()
A singleton would usually have a private constructor to prevent
non-singleton instances.
The problem being if the class in question derives from another class
that has a public constructor... If you are in that
a- (more out of interest) any problems with tasktop? I've found it a
bit buggy/pain to install in ganymede (although mylyn works a dream)
Haven't had any issues with tasktop but I'm very impressed with it so
far. Install was just like any other extension, I'm using zend studio
6.1 which is
Christoph Boget [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
snip
Singletons are not rocket science, but as with all patterns you really
need
to understand the theory before trying to implement and use it.
Agreed. But apparently implementing them in PHP leaves things to be
There is absolutely nothing in PHP which prevents you from implementing the
singleton pattern.
It does if the constructor must be public.
but your attempt is doomed to failure. What makes you think that a singleton
class has to inherit from another class?
Nothing at all. Except that in my
I am getting *Catchable fatal error*: Object of class stdClass could not
be converted to string in *C:\web\easycontactpro\openchecker.php* on
line *49
line 49 is * $mail_head = imap_headerinfo($conn, $i); what could be
casing this. The next line works fine if I delete line 49
$conn =
On 20 Oct 2008, at 21:06, Christoph Boget wrote:
Why can't it be a separate class,
In general, it can. In my case, it can't. Not unless I want to
completely duplicate an already existing class.
Create your singleton class without extending the class you need to
extend. Create an instance
Hi,
Has anyone tried to execute an .exe file from PHP? I am
currently stuck in a situation where I cannot execute the script, and
all I am getting is a blank screen.
This is my code snippet used to execute the file:
//execute program
$a =
On Mon, Oct 20, 2008 at 4:47 PM, Alice Wei [EMAIL PROTECTED] wrote:
Hi,
Has anyone tried to execute an .exe file from PHP? I am
currently stuck in a situation where I cannot execute the script, and
all I am getting is a blank screen.
This is my code snippet used to execute the file:
On 20 Oct 2008, at 21:47, Alice Wei wrote:
Has anyone tried to execute an .exe file from PHP? I am
currently stuck in a situation where I cannot execute the script, and
all I am getting is a blank screen.
This is my code snippet used to execute the file:
//execute program
$a =
On Mon, Oct 20, 2008 at 4:51 PM, Stut [EMAIL PROTECTED] wrote:
4) There is no 4!
This is how the HTTP error code came about in the first place.
Someone heard someone else calling for your missing number.
Four?!? Oh, four?!?
--
/Daniel P. Brown
http://www.parasane.net/ [New Look]
Create your singleton class without extending the class you need to extend.
Create an instance of that class in your object. Implement the __call magic
method to proxy function calls through to that instance throwing an
exception (or error) if the method requested doesn't exist. Not
At 10:12 AM -0400 10/20/08, Daniel Brown wrote:
On Mon, Oct 20, 2008 at 10:02 AM, tedd [EMAIL PROTECTED] wrote:
I hate it when people take things out of context and misquote others. Chris
did not say that one way was better, or different, than the other. But
rather he used two sets of code
Hi gang:
I have a client who wants to send out mass emails to 37,000+ opt-in
members (i.e., not spam).
Any suggestions as to the best way to do this?
Thanks,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List
On Mon, Oct 20, 2008 at 5:24 PM, tedd [EMAIL PROTECTED] wrote:
Hi gang:
I have a client who wants to send out mass emails to 37,000+ opt-in members
(i.e., not spam).
Any suggestions as to the best way to do this?
Letting a third party such as AWeber[1] handle it may be your best
bet.
On 20 Oct 2008, at 22:24, tedd wrote:
I have a client who wants to send out mass emails to 37,000+ opt-in
members (i.e., not spam).
Any suggestions as to the best way to do this?
In my experience it's easiest to outsource this once you get past a
few thousand subscribers otherwise you'll
tedd wrote:
Hi gang:
I have a client who wants to send out mass emails to 37,000+ opt-in
members (i.e., not spam).
Any suggestions as to the best way to do this?
It's been on the list a few times but personally I'd check out
commercial software first, then look at doing your own. The
I figured it out
I am getting *Catchable fatal error*: Object of class stdClass could
not be converted to string in *C:\web\easycontactpro\openchecker.php*
on line *49
line 49 is * $mail_head = imap_headerinfo($conn, $i); what could be
casing this. The next line works fine if I delete line 49
Richard Kurth wrote:
I figured it out
.. and the magic answer is ?
Useful even if just for the archives so others can search for the
error/problem and find a solution quickly.
I am getting *Catchable fatal error*: Object of class stdClass could
not be converted to string in
- Original Message
From: tedd [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Monday, October 20, 2008 4:15:02 PM
Subject: Re: [PHP] what's the difference in the following code?
At 10:12 AM -0400 10/20/08, Daniel Brown wrote:
On Mon, Oct 20, 2008 at 10:02 AM, tedd [EMAIL
Greetings PHP List,
I have run php4 for many years and am finally rolling over to php5.
When I compiled php 5.2.6 and ran make test, I get the following:
=
FAILED TEST SUMMARY
On Tue, 2008-10-21 at 08:39 +1100, Chris wrote:
tedd wrote:
Hi gang:
I have a client who wants to send out mass emails to 37,000+ opt-in
members (i.e., not spam).
Any suggestions as to the best way to do this?
It's been on the list a few times but personally I'd check out
Michael McCallister schreef:
Greetings PHP List,
I have run php4 for many years and am finally rolling over to php5.
When I compiled php 5.2.6 and ran make test, I get the following:
=
FAILED TEST SUMMARY
Christoph Boget schreef:
Create your singleton class without extending the class you need to extend.
Create an instance of that class in your object. Implement the __call magic
method to proxy function calls through to that instance throwing an
exception (or error) if the method requested
Forwarded to Installs and QA.
On Mon, Oct 20, 2008 at 8:40 PM, Michael McCallister
[EMAIL PROTECTED] wrote:
Greetings PHP List,
I have run php4 for many years and am finally rolling over to php5.
When I compiled php 5.2.6 and ran make test, I get the following:
Andy Dyble schreef:
Hi
I am looking for a remote developer for small add hoc jobs. Usually
only a few hours at a time. Basic stuff, listing data from SQL and text
files. Mainly work on existing systems.
personally I'd run in the other direction based on that description,
I mean who decides
Hi,
Thanks for helping me out on this one. It turned out that after removing the
@ sign, I found some errors I have during my exe compilation.
Now the file is working. Thanks.for the heads up, everyone.
Alice
Alice Wei, MIS
Programmer/Computer Application
Developer
ProCure
How do we use
string shell_exec ( string $cmd )
to hit another cgi script from within a PHP page?
I mean I need to do that, and so with my very newbie level of
understanding I think I need to have that shell_exec essentially do 2
things at once:
-goto the right dir, and then
-fire the
hello...
why can't you simply specify the dir/cmd when you run the exec function
ie foo = exec(var\cmd.sh)
or use the backtick approach instead of the exec/shell_exec cmd...
make sure you have given the cmd x privs... and that your process you're
running the php app has the privs to run the
Jochem Maas wrote:
Andy Dyble schreef:
Hi
I am looking for a remote developer for small add hoc jobs. Usually
only a few hours at a time. Basic stuff, listing data from SQL and text
files. Mainly work on existing systems.
personally I'd run in the other direction based on that
Thanks Jochem - much appreciated
Jochem Maas wrote the following on 10/20/2008 6:12 PM:
Michael McCallister schreef:
Greetings PHP List,
I have run php4 for many years and am finally rolling over to php5.
When I compiled php 5.2.6 and ran make test, I get the following:
47 matches
Mail list logo