2009/11/4 Nathan Rixham :
> Nick Cooper wrote:
>>
>> Hi,
>>
>> I was just wondering what the difference/advantage of these two
>> methods of writing a string are:
>>
>> 1) $string = "foo{$bar}";
>>
>> 2) $string = 'foo'.$bar;
>
> 1) breaks PHPUnit when used in classes (need to bug report that)
> 2)
2009/10/28 Warren Vail :
> The curly braces look like something from the smarty template engine.
>
> Warren Vail
Odd. I always thought the curly braces in the Smarty engine looked
like something from PHP. :)
Torben
> -Original Message-
> From: Kim Madsen [mailto:php@emax.dk]
> Sent:
2009/10/13 Andrea Giammarchi :
>
>> > curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
>>
>> I wouldn't recommend setting this to 0 unless you're very sure that
>> the connection will succeed; otherwise, your script will hang
>> indefinitely waiting for the connection to be made.
>
> agreed, it's just
2009/10/13 Andrea Giammarchi :
>
>> $ch = curl_init($url);
>> $fp = fopen('/tmp/curl.out', 'w');
>> curl_setopt($ch, CURLOPT_FILE, $fp);
>> curl_exec($ch);
>>
>> Error checking etc. is of course left up to you. :)
>
> oops, I sent directly the file name. Let me reformulate the code then:
>
>
> set_
2009/10/12 m.hasibuan :
> Newbie question.
> I need to download a very large amount of xml data from a site using CURL.
>
> How to bypass (pipe) curl_exec return value directly to a file, without
> using memory allocation?
>
> set_time_limit(0);
> $ch = curl_init($siteURL);
> curl_setopt($ch, CURLO
2009/10/10 MEM :
>>
>> MEM,
>>
>> http://www.php.net/language.oop5.reflection
>>
>>
>> Regards,
>> Tommy
>>
>>
>
>
> And brand new world opens in from of my eyes... O.O.
>
> I will search more info on this on the net... just for the records, as
> properties names is concern, I couldn't find any bet
On Mon, 5 Oct 2009 16:56:48 +0200
Dotan Cohen wrote:
> I need to store a variable name as a variable. Note quite a C-style
> pointer, but a way to access one variable who's name is stored in
> another variable.
>
> As part of a spam-control measure, a certain public-facing form will
> have dummy
On Thu, 1 Oct 2009 00:24:41 -0400
Daniel Brown wrote:
> On Thu, Oct 1, 2009 at 00:16, Paul M Foster
> wrote:
> >
> > However, assuming it *wasn't*, I've found the following example
> > from a google search (thank goodness for google's "hinting" or I
> > couldn't have found it):
> >
> > $fp = fso
On Thu, 1 Oct 2009 00:16:27 -0400
Paul M Foster wrote:
> On Wed, Sep 30, 2009 at 11:36:55PM -0400, Daniel Brown wrote:
>
> > On Wed, Sep 30, 2009 at 23:29, Paul M Foster
> > wrote:
> > >
> > > I'm not sure how to do this. Please no exotic external libraries
> > > my shared hosting provider does
Chris Streatfield wrote:
Here's a little problem I'm just discovering.
The issue has been brought to my attention by a couple of my clients when
their mail() replies were suddenly turning up with zero variable content.
I have several html/php contact/subscribe forms which return a mail reply
On Mon, 21 Sep 2009 00:43:24 +0200
"Ralph Deffke" wrote:
> Hi Haig,
>
> it would be better if u tell us what purpose u want to solf with this
> approuch. Its hard to understand for a prov why u want to create a
> filename .php
> .php files are scrips containing functions or classes,
> called/ins
On Sun, 20 Sep 2009 12:07:39 +0430
"Parham Doustdar" wrote:
> Hello there,
> I'm guessing that when a row in a MySQL table is removed, the ID
> colomns of the rows which come after that row are not changed. For
> example: 1 2
> 3
> 4
>
> Now, if I want to remove the third rows, the ID colomn wou
out my CGI version is NOT using
> cgi/php.ini but is using
> apache2/php.ini instead.
>
> Thanks again for your help--you deserve a raise. :-)
>
> -Andres
Hi Andres,
Glad it worked!
Regards,
Torben
> Lars Torben Wilson wrote:
> > On Mon, 14 Sep 2009 18:21:11 -040
On Mon, 14 Sep 2009 18:21:11 -0400
Andres Gonzalez wrote:
> In the php configurations directories /etc/php5, there are 2
> subdirectories, one for
> cgi and one for cli. There is a php.ini file in each of these
> directories.
>
> What would cause a difference of behavior in these 2 environment
Tom Worster wrote:
On 9/13/09 10:24 PM, "Tommy Pham" wrote:
--- On Sun, 9/13/09, Tom Worster wrote:
From: Tom Worster
Subject: [PHP] server name that the user agent used
To: "PHP General List"
Date: Sunday, September 13, 2009, 8:21 PM
when using apache with one vhost that
responds to a fe
Tom Worster wrote:
On 9/13/09 3:21 AM, "Lars Torben Wilson" wrote:
On 9/12/09 9:50 AM, "Tom Worster" wrote:
but let me give you a more different example:
$a and $b are normally both objects, each with various members including a
prop q, but sometimes $a is false. i
Tom Worster wrote:
On 9/12/09 9:50 AM, "Tom Worster" wrote:
On 9/12/09 1:32 AM, "Lars Torben Wilson" wrote:
Tom Worster wrote:
if i have an expression that evaluates to an object, the return value from a
function, say, and i only want the value o
Tom Worster wrote:
if i have an expression that evaluates to an object, the return value from a
function, say, and i only want the value of one of the objects properties,
is there a tidy way to get it without setting another variable?
to illustrate, here's something that doesn't work, but it wou
2009/8/31 Nico Sabbi :
> Lars Torben Wilson ha scritto:
>> Hi Nico,
>>
>> First the obligatory "safe_mode is deprecated and not recommended"
>> speech. . .but I guess you've already seen that in the docs and
>> decided to use it anyway.
>>
>
2009/8/28 Nico Sabbi :
> Hi,
> I'm testing one of my sites in safe_mode, but I'm experiencing some
> strangeness that is not documented.
>
> The settings are:
> in php.ini:
> include_path =
> ".:/server/home/apache/php4/:/var/php/5.2/pear/:/usr/php/lib/ezcomponents-2008.2.2/"
>
> in the virtualhost
2009/8/27 mike bode :
> I understand, but that's not an option. I am not interested in getting into
> a Linux vs. Windows fight here, let's just say that I am stuck with Windows.
>
> Now, somthing's gotta be seriously wrong here. I have tried now 4 or 5
> different scripts for the photo gallery tha
2009/8/27 Paul Gardiner :
> Torben Wilson wrote:
>>
>> 2009/8/26 Paul Gardiner :
>>>
>>> Paul Gardiner wrote:
>>>>
>>>> I want to write a simple indexing script to display a
>>>> directory full of photos as a gallery of
2009/8/26 Paul Gardiner :
> Paul Gardiner wrote:
>>
>> I want to write a simple indexing script to display a
>> directory full of photos as a gallery of thumbnails.
>> (There are various solutions out there for this, but
>> they're all a bit more complicated than I need).
>>
>> I've added a file in
2009/8/25 mike bode :
> I just de-installed, then re-installed MySQL, Apache and PHP 5.3. No
> changes. The script does not work on my computer.
>
> Now I get in addition to the error message below this:
>
> [Tue Aug 25 21:29:11 2009] [error] [client 127.0.0.1] PHP Deprecated:
> Function eregi() is
2009/8/25 David Stoltz :
> if(empty($rs->Fields(22))){
Hi David,
You cannot call empty() on a function or class method like that. From
the manual:
Note: empty() only checks variables as anything else will result in
a parse error. In other words, the following will not work:
empty(trim($nam
2009/8/24 Paul M Foster :
> On Mon, Aug 24, 2009 at 10:37:11AM -0700, Chris Carter wrote:
>
>>
>> Is there any alternative method to do this !!! Sending email through PHP?
>>
>
> Sure. You can use a class like PHPMailer rather than the built-in mail()
> function. But it's not going to matter if the
2009/8/24 Chris Carter :
>
> Hi,
>
> The code below actually takes input from a web form and sends the fields
> captured in an email. It used to work quite well since past few years. It
> has stopped now. I used Google's mail servers (google.com/a/website.com)
>
> $fName = $_REQUEST['fName'] ;
>
Aargh. Slipped on the trigger there--premature Send. See below for
what I meant to send:
2009/8/22 Lars Torben Wilson :
> 2009/8/22 Keith :
>> Thanks! Torben.
>> I got the point now and it works! :-)
>> I'm doing this because the statements of each cases is quite l
default:
break;
}
> "Lars Torben Wilson" wrote in message
> news:36d4833b0908202323p3c858b5fn6a1d6775aa7f8...@mail.gmail.com...
>>
>> 2009/8/20 Keith :
>>>
>>> Hi,
>>> I encounter a funny limitation here with switch case as below:
>
2009/8/22 Szczepan Hołyszewski :
>> Hm. . .it does look odd. Searching the bugs database at
>> http://bugs.php.net does turn up one other report (at
>> http://bugs.php.net/bug.php?id=47870 ) of array() returning NULL in
>> certain hard-to-duplicate circumstances on FreeBSD,
>
> Yes, I found it even
2009/8/22 Szczepan Hołyszewski :
>> What it looks like to me is that something is causing $foo to be a
>> string before the '$foo[] = "bar";' line is encountered. What do you
>> get if you put a gettype($foo); just before that line?
>>
>> > $foo=null;
>> > $foo[]="bar"; // <-- $f
2009/8/22 Szczepan Hołyszewski :
> Hello!
>
> I am almost certain I am hitting some kind of bug. All of a sudden, array()
> stops returning an empty array and starts returning something weird. The weird
> thing behaves as NULL in most circumstances (e.g. gettype() says NULL),
> except:
>
> $
2009/8/20 Jim Lucas :
> Lars Torben Wilson wrote:
>> 2009/8/19 Per Jessen :
>>> Jim Lucas wrote:
>>
>> [snip]
>>
>>> I probably wouldn't have chosen PHP for the first one, but there's no
>>> reason it shouldn't work. For the se
2009/8/20 Keith :
> Hi,
> I encounter a funny limitation here with switch case as below:
> The value for $sum is worked as expected for 1 to 8, but not for 0.
> When the $sum=0, the first case will be return, which is "sum=8".
> Is there any limitation / rules for switch case? Thanks for advice!
>
2009/8/19 Per Jessen :
> Jim Lucas wrote:
[snip]
> I probably wouldn't have chosen PHP for the first one, but there's no
> reason it shouldn't work. For the second one, did you mean to
> write "serial port"? That's a bit of a different animal, I'm not sure
> how far you'll get with php.
>
>> He
2009/8/18 Per Jessen :
> Lars Torben Wilson wrote:
>
>> Again, that's not a daemon. If it is sufficient to run a background
>> process then that's fine, but that doesn't make it a daemon (although
>> it shares some things in common with a daemon). The backgr
2009/8/18 Per Jessen :
> Jim Lucas wrote:
>
>> Does anybody know how to use PHP as a daemon without the use of
>> pcntl_fork.
>>
>
> Sure. Just start it and leave it running.
>
>> I want to launch a daemon out of the /etc/rc.local when the system
>> starts.
>
> Yep, I do that all the time.
>
>> Any
2009/8/17 Jim Lucas :
> I want this to be a system that works out of the box. For the most part.
>
> I am expecting to have phone system vendors and low-level IT personal trying
> to install this thing.
>
> I don't want to have to field tons of questions on "How do I compile this
> p*(_fork thin
2009/8/17 Jim Lucas :
> Does anybody know how to use PHP as a daemon without the use of pcntl_fork.
>
> http://php.net/pcntl_fork
Hi Jim,
AFAIK you can't. Read on. . .
> I don't want to have to have a person have a special/custom compilation
> of PHP just to run a simple daemon.
>
> My system:
2009/5/24 shahrzad khorrami :
> :-o
> I want to divide this large csv file with programming to small one!
If you're on *nix:
% man split
Regards,
Torben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
2009/1/24 Christopher W :
> At least I hope it is simple...
>
> I am trying to get an HTML menu link to set a variable's value. For
> example, when a user clicks the "Home" button on my page it would cause
> $page = "home"; or clicking the "About Us" button will set $page="about_us";
> etc.
>
> I
2009/1/16 Shawn McKenzie :
> Lars Torben Wilson wrote:
>> 2009/1/15 tedd :
>>> At 9:46 AM -0800 1/15/09, Chris Carter wrote:
>>>
>>> Chris:
>>>
>>> That's not the way I would do it. After establishing a connection with the
>>>
2009/1/21 Daniel Brown :
> On Wed, Jan 21, 2009 at 20:27, Jack Bates wrote:
>> How can I tell the difference between a variable whose value is null and
>> a variable which is not set?
>
>Unfortunately, in PHP - like other languages - you can't.
>
>A variable is considered to be null if:
>
2009/1/15 tedd :
> At 9:46 AM -0800 1/15/09, Chris Carter wrote:
>
> Chris:
>
> That's not the way I would do it. After establishing a connection with the
> database, I would use the query:
>
> $query "SELECT email FROM owners WHERE email = '$emailAddress' ":
> $result = mysql_query($query) or die(
2009/1/15 Leon du Plessis :
> I used that notation before, and it did not work 100%.
> Adapt as follows:
>
> for ($i = 'a'; $i <= 'z'; $i++)
>if ($i == "aa") break; else echo $i;
It's weird, but true--the simple '<=' breaks the loop.
However, in the above example, you don't need the 'else'; t
id]}'";
>
> I missed taking an extra quote mark out
Closer, but still not quite there. For encapsulation in the string, it
should look like:
$where = "where ref_is='{$Reference[$x]['ref_id']}'";
Someone else mentioned casting to int first as well to sanitize, which
is also a good idea.
Torben
> Ash
> www.ashleysheridan.co.uk
--
Torben Wilson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
2009/1/3 Ashley Sheridan :
> On Sat, 2009-01-03 at 17:39 -0500, Eric Butera wrote:
>> On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
>> wrote:
>> > Am 2009-01-03 10:16:43, schrieb Eric Butera:
>> >> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
>> >> > I don't think this is actually possible.
2008/12/29 brad :
> Hi,
>
> I'm executing a python script from php that runs quite a long time (15+
> minutes) and ends up timing out. Is there a way I can execute the python
> code and move on executing the remaining php code on the page?
> Thanks!
Hi Brad,
It's a little tough to say for sure si
2008/12/22 Jim Lucas :
> Rene Fournier wrote:
>> Hi, I'm looking for some ideas on the best way to parse blocks of text
>> that is formatted such as:
>>
>> $sometext %\r\n-- good data
>> $otherstring %\r\n-- good data
>> $andyetmoretext %\r\n
> > $i = 0; while ($i < $j)
>> >{
>> >...
>> >$i++;
>> >}
>> >
>> > as the former apparently uses less memory references. However I find it
>> > very hard to
>> > believe that the difference wo
2008/12/22 Nathan Nobbe :
> On Mon, Dec 22, 2008 at 3:10 PM, Clancy wrote:
>
>> On Mon, 22 Dec 2008 10:20:09 +1100, dmag...@gmail.com (Chris) wrote:
>>
>> >I'd call this a micro-optimization. If changing this causes that much of
>> >a difference in your script, wow - you're way ahead
ing and adding to it the first part(string) and then the
>> second
>> >> part (var); once completed it can echo it out. The second is simply two
>> >> opcodes, a concatenate and an echo. Interpolation.
>> >>
>> >
>> > I'd call this a micro-optimization. If changing this causes that much of
>> a
>> > difference in your script, wow - you're way ahead of the rest of us.
>> >
>> >
>> >
>> http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html
>> >
>> > http://www.phpbench.com/
>> >
>> > --
>> > Postgresql & php tutorials
>> > http://www.designmagick.com/
>> >
>> >
>>
>
--
Torben Wilson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
2008/11/21 Glen Carreras <[EMAIL PROTECTED]>:
>
>
> On 11/22/2008 12:10 AM, Lars Torben Wilson wrote:
>>
>> Hi Glen,
>>
>> Works for me. IPv6 support was added in 2001. You didn't say what
>> version of PHP you are having this problem with, so it
2008/11/21 Glen C <[EMAIL PROTECTED]>:
> Hello,
>
> Does gethostbyaddr actually work for anyone while looking up an IPv6
> address? I can't seem to get it to work. For example:
>
> echo gethostbyaddr ( '2001:470:0:64::2' );
>
> should return "ipv6.he.net" but instead I get the following error:
>
2008/11/20 Stut <[EMAIL PROTECTED]>:
> On 20 Nov 2008, at 06:55, Yashesh Bhatia wrote:
>>
>> I wanted to use in_array to verify the results of a form submission
>> for a checkbox and found an interesting
>> behaviour.
>>
>> $ php -v
>> PHP 5.2.5 (cli) (built: Jan 12 2008 14:54:37)
>> $
>>
>> $ cat
2008/11/19 Robert Cummings <[EMAIL PROTECTED]>:
> On Wed, 2008-11-19 at 19:49 +, Ashley Sheridan wrote:
>> On Wed, 2008-11-19 at 08:31 -0600, Terion Miller wrote:
>> > I am still getting the Invalid arguement error on this implode:
>> >
>> > if (isset($_POST['BannerSize'])){$BannerSize =
>> > i
2008/11/19 Yashesh Bhatia <[EMAIL PROTECTED]>:
> Hi.
>
> I wanted to use in_array to verify the results of a form submission
> for a checkbox and found an interesting
> behaviour.
>
> $ php -v
> PHP 5.2.5 (cli) (built: Jan 12 2008 14:54:37)
> $
>
> $ cat in_array2.php
> $node_review_types = array
2008/10/31 Stut <[EMAIL PROTECTED]>:
> On 31 Oct 2008, at 17:32, Maciek Sokolewicz wrote:
>>
>> Kyle Terry wrote:
>>>
>>> -- Forwarded message --
>>> From: Kyle Terry <[EMAIL PROTECTED]>
>>> Date: Fri, Oct 31, 2008 at 9:31 AM
>>> Subject: Re: [PHP] Count the Number of Elements Using
2008/10/27 Martin Zvarík <[EMAIL PROTECTED]>:
>
> Hi, I am aware of this, but explaining my problem in this case would take me
> an hour --- and eventually would lead to a) misunderstanding, b) weird
> solution, c) no solution...
Forgive me if I misunderstand, but it seems like you are willing to
2008/10/26 Martin Zvarík <[EMAIL PROTECTED]>:
> PHP Version 5.2.4
>
> $node = '[5][1][]';
> ${'tpl'.$node} = 'some text';
>
> print_r($tpl); // null
> ?>
>
>
> I really don't like to use the EVAL function, but do I have choice??
> This sucks.
Hi there,
While this question can spur some neat solu
s, and also, just
read through some of the existing modules.
Torben
"Lars Torben Wilson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Rosen wrote:
I can write it to another language ( like C, Delphi ) but I don't know
how
to "integrate" this with PHP - i
Rosen wrote:
I can write it to another language ( like C, Delphi ) but I don't know how
to "integrate" this with PHP - i.e. to create it as module for PHP.
I would suggest going the simple route for now, then if you need it (for
performance or whatever) later on, write it up as a module then.
Write
Justin Patrin wrote:
On Wed, 21 Jul 2004 13:55:37 -0500, Michael Sims
<[EMAIL PROTECTED]> wrote:
Michael Sims wrote:
Justin Patrin wrote:
On Wed, 21 Jul 2004 10:09:52 -0700, bruce <[EMAIL PROTECTED]>
wrote:
2) i could run the perl script, and have it somehow run in the
background this would ba
Jeff Oien wrote:
Thanks for the helpful examples. One other question. Is there an
advantage to sending the URL via a header as opposed to doing http_post
like this?
http://shiflett.org/hacks/php/http_post
Jeff
As mentioned a couple of times, size is one. But you still need to
url-encode the data
imited in length, and one reason for
using method=post is that they won't fit in a URL, for this you'll need to
make sure they fit.
Warren Vail
You could do that, but for one thing, it doesn't handle arrays. The code
snippet in the user notes does.
--
Torben Wilson <[EMAIL PROT
Jeff Oien wrote:
Dumb question, sorry if it's a repeat. I will use PHP for a form with
error checking. When there are no errors I need to send all the
variables thru something like this:
$URL = "https://example.com/script.asp?First=Jim&Last=Smith";;
urlencode($URL);
header("Location: $URL\n");
H
itten both versions of the
function to take the same (or similar) argument lists and return the
same thing, then all you need to do to change from one to the other
is replace the old include file with the new one.
Hope this helps,
Torben Wilson <[EMAIL PROTECTED]>
For example:
www.php.net/mime-
Don wrote:
Hi,
Using a a flat text file based calendar script.
Started getting this error after upgrading PHP:
Warning: fread(): Length parameter must be greater than 0
Function it is occurring in is:
function read_str($fp)
{
$strlen = $this->bin2dec(fread($fp,4),4);
return fread($fp, $str
Rosen wrote:
Ok,
I don't understand why IP adress will bi "invisible" for $_SERVER variable.
It should be there, but mostly because the CGI 1.1 spec requires that it
be provided to the script. There is no physical requirement for it to be
there.
Reasons for it not being present could include:
o Inc
ishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
Torben Wilson <[EMAIL PROTECTED]>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Marek Kilimajer wrote:
Lars Torben Wilson wrote:
Josh Close wrote:
So basically there is no easy way around this.
What I'm trying to do is have a page return to a page that was a
couple pages back with the same get info. On the second page I can do
$return_url = $_SERVER['HTTP_REFERER
go. Note: you need to URL-encode the
data you send into a string before passing it to the above function.
Hope this helps,
Torben
--
Torben Wilson <[EMAIL PROTECTED]>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
colors and this happens very rarely. In
any case I will be working on PHP5 so i guess it will not happen again
This is explained in the manual section on arrays:
http://www.php.net/manual/en/language.types.array.php#language.types.array.donts
Sorry if that link wraps.
Cheers,
--
Torben Wils
Jordi Canals wrote:
Angelo, thanks for your comments.
session_name must go before session_start.
I think register_globals has nothing to do with session cookies. I
always work with register_globals = off as recommended.
About the cookie params (In PHP.INI) I checked them on the two platforms
wi
Josh Close wrote:
I'm trying to get a simple regex to work. Here is the test script I have.
#!/usr/bin/php -q
$string = "hello\nworld\n";
$string = preg_replace("/[^\r]\n/i","\r\n",$string);
First, the short version. You can fix this by using backreferences:
$string = preg_replace("/([^\r])\n/i",
Scott Fletcher wrote:
Hey everyone,
I'm very curious about the object-orientated thingies in PHP 5. Anyone
know of a sample scripts I can read it on? And how does it work since the
browser-webserver is one sided in communication or one way, not both way?
Scott F.
Zend.com is absolutely drown
Harlequin wrote:
Cheers Lars.
So, for example, if I wanted to display some plain text tabbed I'd use:
echo "string1\tstring2\tstring3";
There's just one problem though - it formats the text differently to the
rest of the page (I'm using CSS to control this).
Any thoughts...?
Try adding 'white-spac
Harlequin wrote:
I know I'm probably going to get flamed for this but it is only a
development site but I am having some trouble getting the syntax right for
using the tab when echoing information. My current command is:
print_r("Host: $hostUser: $userPassword: $password");
I've tried:
print_r("H
Matthew Sims wrote:
I recently purchased George Schlossnagle's Advanced PHP Programming and on
page 85 in the Error Handling chapter, he made a reference about the
is_int function.
In the above function example he had:
if (!preg_match('/^\d+$/',$n) || $n < 0) {
In which he mentions:
It might be
Vlad Georgescu wrote:
how can test if var $int is integer ?
In the manual:
http://www.php.net/is_int
Another one which might be helpful:
http://www.php.net/is_numeric
Hope this helps,
Torben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Charlie Don wrote:
Hello,
I need to have some scripts that do database maintanance on my cron tab.
However, some might take more time to execute that the maxtime set on
php.ini.
These are now web scripts but scripts that I execute on my command
prompt or cron tab.
I wonder if there is any way t
Lars Torben Wilson wrote:
Sorry about following up to myself, but I was really really hungry
when I wrote the first one:
[snip]
This code returns the names in the format in which they are given. You
can speed it up a bit by having it return the names in 'lastname,
firstname'
format
ated,
Tia,
Andre
Hopefully the code above will give you some aid--and you can probably improve
on that regexp in preg_match_all(). The other 2 ways on the site have totally
different methods, and different strengths and weaknesses. Maybe you can turn
one of them into something useful to you.
Hope this helps,
Torben
--
Torben Wilson <[EMAIL PROTECTED]>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
kind of thing. For
instance, marc.theaimsgroup.com, phpbuilder.com, and anybody who runs
an NNTP web interface which includes this list--just to name a few--have
web-accessible archives of this list, and are unaffiliated with the PHP
group.
--
Torben Wilson <[EMAIL PROTECTED]>
; Chris.
'Until' is a bit optimistic. They've been doing that for quite some
time now. :)
--
Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506
http://www.thebuttlesschaps.com http://www.inflatableeye.com
http://www.hybrid17.com
t; >punchline ;)
> >
> >Cheers,
> >Rob.
Oh fer Pete's sake. lol--got me. The sad thing is that sometimes things
get to a point on the list where this sort of thing would seem likely...
--
Torben Wilson <[EMAIL PROTECTED]>+1.604.709.05
atically know what goes
into the database, but if you post a detailed description of the
problem you're facing, chances are that someone (or several someones,
more likely) will provide suggestion to help you out.
Feel free to post details if you would like a hand with it.
--
Torb
On Thu, 2003-07-24 at 04:18, Comex wrote:
> <[EMAIL PROTECTED]>
> Lars Torben Wilson:
> > On Wed, 2003-07-23 at 18:21, Daryl Meese wrote:
> >> Well, I know I am not running the latest version of PHP but I don't
> >> believe this is accurate. I believe PHP
ctive every day for years over many
different version of PHP in many different environments. The good news
is that the problem is not with PHP. That means it's the code, which is
easy to fix.
--
Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506
27;re mistaken. If you're correct, it's a bug. I'm pretty sure we
would have heard about it by now. :)
But give it a try and post your results (I don't have a Win PHP box
set up right now, myself).
--
Torben Wilson <[EMAIL PROTECTED]>+1.604.709.
On Thu, 2003-07-24 at 15:12, Beauford.2005 wrote:
> action="post" name="seasons">
Try ACTION="/season_write.php" instead. What happens?
--
Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506
http://www.thebuttlesschaps.com
hould take 30
> seconds to complete.
>
> If anyone has some concrete suggestion on how to get this to work It
> would be greatly appreciated. In the mean time I have given up on it as
> I am just totally pissed off at it.
>
> TIA
--
Torben Wilson <[EMAIL PROTECTE
t; Jason Giangrande
Without going into why you didn't read the manual or just try it, the
answer is 'wrong'. ;) If register_globals is off, $_SERVER['PHP_SELF']
is what you will need.
Good luck,
Torben
--
Torben Wilson <[EMAIL PROTECTED]>
ing the
> Reply-To for each email I send so that replies to other unrelated mail
> don't end up on php list? The list should second-guess members of the list
> want to reply to the list 99% of the time without being wrong.
I disagree. Oddly, I've known people who have been
about programming--I think last week or the week before. Try a
search on the archives. Anyway, there are lot of great books on
programming which should help--and excellent and easy-to-read book which
covers a lot of things which you *don't* want to have to figure out
yourself is 'Code Complete&
bute values for all of the necessary stuff.
Other than that, it's not a huge issue.
--
Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506
http://www.thebuttlesschaps.com http://www.inflatableeye.com
http://www.hybrid17.com
alue) {
$query = "update table set $key = '$value'";
}
Also, unless you have constants named 'headerimage' and
'backgroundimage', you should quote the array subscripts:
$SAVEVARS['headerimage'] = $_POST['headerimage'];
ccurs in the "$singleProfileHTML.." line. I'm
> completely don't get it; I see absolutely nothing wrong with this,
> what did I miss?
>
> Phil
I don't see anything wrong. Perhaps you have a non-printable control
character em
he
> database the line returns dissapear, eg
>
> "this
>
> little amount of
>
> text"
>
> will enter like
>
> "this little amount of text will enter like"
>
> Please help me it is p!!$$!ng me right off :P
>
> Cheers in ad
.php on line 43
>
>
> Anyone have an idea of what may be causing this?
>
> thanks
Are you 100% sure that $filename is an array when you give it to
foreach? Check to make sure that $filename exists and is an array
first. That should help.
Good luck,
Torben
--
T
1 - 100 of 348 matches
Mail list logo