On Thu, 20 Sep 2007 02:52:19 -0400 Andrew Prostko said:
Ok, so I started using the header code that was suggested:
And I get this error:
Parse error: parse error, unexpected '{' in
/home/char-lee/public_html/beta/1.php on line 3
This is the code:
---
---
--
PHP Gene
Wow, it really must be late, Thank you for pointing out that missing
parenthesis
... 330am and now I can go to bed happy... TY VM
Ending Code for anyone listening:
Get PW from another .php page using:
What is the Password?:
This is the passwordcheck.php code:
--
PHP General Mailing Lis
Andrew Prostko wrote:
Ok, so I started using the header code that was suggested:
And I get this error:
Parse error: parse error, unexpected '{' in
/home/char-lee/public_html/beta/1.php on line 3
This is the code:
---
You'll be wanting to put burgers in quotes and close the bracket
Andrew Prostko wrote:
Wow, it really must be late, Thank you for pointing out that missing
parenthesis
... 330am and now I can go to bed happy... TY VM
Ending Code for anyone listening:
Get PW from another .php page using:
What is the Password?:
This is the passwordcheck.php code:
You
Hi everyone,
I want to highlight (bold) searchterms in text.
For example, for all words starting with "ethyl":
a) replace "ethyl" by "ethyl"
b) replace "Ethyl" by "Ethyl"
c) replace "ethylene" by "ethylene"
d) but not "methyl" by "methyl"
Now I use:
$patterns[0] = "/ethyl/";
$replacements[0] = "e
- Original Message -
From: "Deniz Dizman (BST UGB)" <[EMAIL PROTECTED]>
To: "C.R.Vegelin" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]"
Sent: Thursday, September 20, 2007 10:38 AM
Subject: RE: [PHP] highlighting searchterms as bold text
try /^ethyl/i
what you want is ignore case and patt
> > Hi everyone,
> >
> > I want to highlight (bold) searchterms in text.
> > For example, for all words starting with "ethyl":
> > a) replace "ethyl" by "ethyl"
> > b) replace "Ethyl" by "Ethyl"
> > c) replace "ethylene" by "ethylene"
> > d) but not "methyl" by "methyl"
> >
> > Now I use:
> > $pat
On 20 September 2007 11:34, Edward Kay wrote:
> > > Hi everyone,
> > >
> > > I want to highlight (bold) searchterms in text.
> > > For example, for all words starting with "ethyl":
> > > a) replace "ethyl" by "ethyl"
> > > b) replace "Ethyl" by "Ethyl"
> > > c) replace "ethylene" by "ethylene"
>
- Original Message -
From: "Deniz Dizman (BST UGB)" <[EMAIL PROTECTED]>
To: "C.R.Vegelin" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]"
Sent: Thursday, September 20, 2007 11:29 AM
Subject: RE: [PHP] highlighting searchterms as bold text
thats odd because the regex passes when I test it w
I have a very large text file that gets dumped into a directoory every
now and then. It is typically around 750MB long, at least, and my
question is:
What is the best method to parse this thing and insert the data into a
postgres db?
I have tried using file(), fget*() and some others, all with l
Paul Scott wrote:
I have a very large text file that gets dumped into a directoory every
now and then. It is typically around 750MB long, at least, and my
question is:
What is the best method to parse this thing and insert the data into a
postgres db?
I have tried using file(), fget*() and some
Hi,
Here's what you need:
RegEx:
/((\w+)?#SearchTermHere#(\w+)?)/i
Of course, replace your #SearchTermHere# with what you need,
i.e. /((\w+)?ethyl(\w+)?)/i
Code sample:
$_textToHighlight='ethyl Lorem Ethyl ipsum MeThYl dolor Ethylene sit';
$_search='/((\w+)?ethyl(\w+)?)/i';
$_replace='\\1';
> Paul Scott wrote:
> > I have a very large text file that gets dumped into a directoory every
> > now and then. It is typically around 750MB long, at least, and my
> > question is:
> >
> > What is the best method to parse this thing and insert the data into a
> > postgres db?
> >
> > I have tried
On Thu, 2007-09-20 at 12:50 +0100, Edward Kay wrote:
> In addition to Martin's good suggestions (and also assuming you're running
> php-cli via cron), you could use nice to stop it consuming too many
> resources:
>
This is the current approach that I am taking, was just really wondering
if there
Sorry, I didn't read d) right (NOT Methyl),
here is teh new regex :
/(\b#SearchTermHere#(\w+)?)/i
The code sample is the same, replace regex, of course .
Output should be :
ethyl Lorem Ethyl ipsum MeThYl dolor Ethylene sit
Cheers
Puiu Hrenciuc wrote:
Hi,
Here's what you need:
RegEx:
/((
On Thu, 2007-09-20 at 13:55 +0200, Paul Scott wrote:
> On Thu, 2007-09-20 at 12:50 +0100, Edward Kay wrote:
> > In addition to Martin's good suggestions (and also assuming you're running
> > php-cli via cron), you could use nice to stop it consuming too many
> > resources:
>
> This is the current
On Thu, 2007-09-20 at 13:09 +0100, C.R.Vegelin wrote:
> - Original Message -
> From: "Deniz Dizman (BST UGB)" <[EMAIL PROTECTED]>
> To: "C.R.Vegelin" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]"
>
> Sent: Thursday, September 20, 2007 11:29 AM
> Subject: RE: [PHP] highlighting searchterms as
- Original Message -
From: "Deniz Dizman (BST UGB)" <[EMAIL PROTECTED]>
To: "C.R.Vegelin" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]"
Sent: Thursday, September 20, 2007 12:25 PM
Subject: RE: [PHP] highlighting searchterms as bold text
you probably have some characters before/after the ph
On Thu, 2007-09-20 at 08:03 -0400, Robert Cummings wrote:
> Post some samples of the data you are parsing and a sample of the code
> you've written to parse them. If you're parsing 750 megs of data then
> it's quite likely you could squeeze some performance out of the parse
> routines themselves.
- Original Message -
From: "Puiu Hrenciuc" <[EMAIL PROTECTED]>
To:
Sent: Thursday, September 20, 2007 12:56 PM
Subject: Re: [PHP] highlighting searchterms as bold text
Sorry, I didn't read d) right (NOT Methyl),
here is teh new regex :
/(\b#SearchTermHere#(\w+)?)/i
The code sample i
Robert Cummings wrote:
On Thu, 2007-09-20 at 13:55 +0200, Paul Scott wrote:
On Thu, 2007-09-20 at 12:50 +0100, Edward Kay wrote:
In addition to Martin's good suggestions (and also assuming you're running
php-cli via cron), you could use nice to stop it consuming too many
resources:
This is the
I have images of varying sizes. I want them to be scaled prior to upload to
a set size of 300 x 200 px
$imageinfo = getimagesize($_FILES['userfile']['tmp_name']);
$ix=$imageinfo[0];
$iy=$imageinfo[1];
//upload the images script
I
--
PHP General Mailing List (http://www.php.net/)
To unsubs
Paul Scott wrote:
On Thu, 2007-09-20 at 08:03 -0400, Robert Cummings wrote:
Post some samples of the data you are parsing and a sample of the code
you've written to parse them. If you're parsing 750 megs of data then
it's quite likely you could squeeze some performance out of the parse
routines
Paul Scott wrote:
> Code:
> [SNIP]
> $row = 1;
> $handle = fopen($csvfile, "r");
> while (($data = fgetcsv($handle, 1000, "\t")) !== FALSE) {
> $num = count($data);
> $row++;
> $insarr = array('userid' => $userid,
> 'geonameid' => $data[0],
[snip]
> $thi
On Thu, 2007-09-20 at 14:25 +0200, Paul Scott wrote:
> On Thu, 2007-09-20 at 08:03 -0400, Robert Cummings wrote:
> > Post some samples of the data you are parsing and a sample of the code
> > you've written to parse them. If you're parsing 750 megs of data then
> > it's quite likely you could squee
C.R.Vegelin wrote:
- Original Message - From: "Puiu Hrenciuc" <[EMAIL PROTECTED]>
To:
Sent: Thursday, September 20, 2007 12:56 PM
Subject: Re: [PHP] highlighting searchterms as bold text
Sorry, I didn't read d) right (NOT Methyl),
here is teh new regex :
/(\b#SearchTermHere#(\w+)?)/i
Paul Scott wrote:
> On Thu, 2007-09-20 at 12:50 +0100, Edward Kay wrote:
>> In addition to Martin's good suggestions (and also assuming you're
>> running php-cli via cron), you could use nice to stop it consuming
>> too many resources:
>>
>
> This is the current approach that I am taking, was ju
Hi.
I like clean URL site like http://del.icio.us/someone/tag
(del.icio.us is powered by PHP, right?)
But I have no idea how can I do it with PHP.
Is this a just apache's rewrite magic? or another different technique?
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, vi
That's nice.
On 9/20/07, Hulf <[EMAIL PROTECTED]> wrote:
> I have images of varying sizes. I want them to be scaled prior to upload to
> a set size of 300 x 200 px
>
>
> $imageinfo = getimagesize($_FILES['userfile']['tmp_name']);
>
> $ix=$imageinfo[0];
> $iy=$imageinfo[1];
>
>
>
> //upload the
On Thu, 2007-09-20 at 23:12 +0900, js wrote:
> Hi.
>
> I like clean URL site like http://del.icio.us/someone/tag
> (del.icio.us is powered by PHP, right?)
>
> But I have no idea how can I do it with PHP.
> Is this a just apache's rewrite magic? or another different technique?
Apache rewrite magi
Hulf wrote:
I have images of varying sizes. I want them to be scaled prior to upload to
a set size of 300 x 200 px
$imageinfo = getimagesize($_FILES['userfile']['tmp_name']);
$ix=$imageinfo[0];
$iy=$imageinfo[1];
//upload the images script
I
So, let me get this straight, you want to resi
Sorry my message was cut off.
Yes I want to scale to 300 x 200px before I upload the image to my folder.
Here is my code so far.
thanks,
H.
$imageinfo = getimagesize($_FILES['userfile']['tmp_name']);
echo $x=$imageinfo[0];
echo $y=$imageinfo[1];
$newwidth = 300;
$newheight = 200;
// Load
Hulf wrote:
Sorry my message was cut off.
Yes I want to scale to 300 x 200px before I upload the image to my folder.
Here is my code so far.
thanks,
H.
$imageinfo = getimagesize($_FILES['userfile']['tmp_name']);
echo $x=$imageinfo[0];
echo $y=$imageinfo[1];
$newwidth = 300;
$newheight =
This is the full code so far. The files are saving but they are not
resizing.
Can anyone help? I need to get this
$myimage = imagejpeg($thumb);
into $target_path directory.
H.
--
if(isset($_POST['_upload']) && $_FILES['userfile']['size'] > 0)
{
$ima
Hulf wrote:
This is the full code so far. The files are saving but they are not
resizing.
Can anyone help? I need to get this
$myimage = imagejpeg($thumb);
into $target_path directory.
H.
--
if(isset($_POST['_upload']) && $_FILES['userfile']['size'
Hey all,
I'm kinda new at PHP (but not entirely new). I'm having a heck of a
time with PHP causing my apache processes to segfault. I've found a few
cases where it's something simple, like referring to an object property
that does not exist, but it's painstaking work. I'm reduced to
commen
[snip]
I'm kinda new at PHP (but not entirely new). I'm having a heck of a
time with PHP causing my apache processes to segfault. I've found a few
cases where it's something simple, like referring to an object property
that does not exist, but it's painstaking work. I'm reduced to
commenting
I am not sure what the heck is going with this but here is my problem.
I am trying to validate the contents of an array, then determine if the
errors are with the array or another form submitted variable.
The problem is after the code validates the array and other form
variables using an if state
Hi,
Just wondering what people's general opinion is on working with XML in PHP?
I like working with SimpleXML but DomDocument seems more useful in some
cases (e.g. working with XSLT transforms etc.).
So what do you thing? Or do would you simply create a few utility
classes to handle conversions?
The punchline question is: What am I missing?
Now for the details.
I have a form through which a user uploads image files. In the event
the chosen file exceeds the MAX_FILE_SIZE (which I have included as
a hidden form field immediately after the form tag), I want to abort
the upload process and d
just don't use php 5.1.6
Chris Curvey-2 wrote:
>
> Hey all,
>
> I'm kinda new at PHP (but not entirely new). I'm having a heck of a
> time with PHP causing my apache processes to segfault. I've found a few
> cases where it's something simple, like referring to an object property
> that doe
In the
_
More photos; more messages; more whatever – Get MORE with Windows Live™
Hotmail®. NOW with 5GB storage.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_5G_0907
--
PHP General Mailing Li
At 4:14 PM -0400 9/19/07, brian wrote:
tedd wrote:
At 11:52 AM -0400 9/17/07, brian wrote:
tedd wrote:
Richard Kurth wrote:
$Campaign_array| = array('0','1','3','5','8','15','25');|
I know that I can find the next recored in a array using next.
What I do not understand is if I know the la
Hi gang:
Would someone be so kind as to explain to me how one can use exec()
with safe_mode on?
TIA,
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsu
On Thu, 2007-09-20 at 20:34 +0100, Colin Guthrie wrote:
> Hi,
>
> Just wondering what people's general opinion is on working with XML in PHP?
>
> I like working with SimpleXML but DomDocument seems more useful in some
> cases (e.g. working with XSLT transforms etc.).
>
> So what do you thing? Or
On Thu, 2007-09-20 at 16:14 -0400, tedd wrote:
> Hi gang:
>
> Would someone be so kind as to explain to me how one can use exec()
> with safe_mode on?
http://ca.php.net/manual/en/features.safe-mode.php#ini.safe-mode-exec-dir
Cheers,
Rob.
--
.
Wow this formatted badly. (new hotmail on Safari -- MS made FF not even render
well)
Anyway, are you sure you are reaching the code you want to reach?
Perhaps !== is overkill and maybe even wrong when you should use ==.
Same with the other === usage?
Try some
echo "HERE1\n";
echo "HERE2\n";
t
In the To: php-general@lists.php.net> Date: Thu, 20 Sep 2007 14:45:36 -0500>
From: [EMAIL PROTECTED]> Subject: [PHP] MAX_FILE_SIZE not working with file
uploads>> The punchline question is: What am I missing?>> Now for the
details.>> I have a form through which a user uploads image files. In t
tedd wrote:
At 4:14 PM -0400 9/19/07, brian wrote:
tedd wrote:
>>>
Duh?
You program for that -- you want me to write the entire code?
~sigh~
Grasshopper, the point i was trying to make is that your example
displays what *not* to do with array_search(). Though a wonderful
teaching aid in
Robert Cummings wrote:
> I still use PHP4 so I wrote my own XML handling class that wraps the
> xml_xxx() series of functions. Haven't had a problem with it. Makes
> working with XML very easy since it uses a path string syntax to
> focus/access nodes and attributes:
Cheers for that.
I know I def
On Thu, 20 Sep 2007 12:58:28 -0600, you wrote:
>I am not sure what the heck is going with this but here is my problem.
>
>I am trying to validate the contents of an array, then determine if the
>errors are with the array or another form submitted variable.
>
>The problem is after the code validate
Max file size is a hint to the browser and not all support it...you can't count
on it
bastien
> To: php-general@lists.php.net> Date: Thu, 20 Sep 2007 14:45:36 -0500> From:
> [EMAIL PROTECTED]> Subject: [PHP] MAX_FILE_SIZE not working with file
> uploads> > The punchline question is: What am
On Thu, 2007-09-20 at 09:54 -0300, Martin Marques wrote:
> If not, you should just use the COPY command of PostgreSQL (you are
> using PostgreSQL if I remember correctly) or simply do a bash script
> using psql and the \copy command.
>
Unfortunately, this has to work on all supported RDBM's -
Paul Scott wrote:
On Thu, 2007-09-20 at 09:54 -0300, Martin Marques wrote:
If not, you should just use the COPY command of PostgreSQL (you are
using PostgreSQL if I remember correctly) or simply do a bash script
using psql and the \copy command.
Unfortunately, this has to work on all suppor
And here is the dump of the $_FILES array (which, notably, reports
zero as the size):
[error] => 2
And also gives you an error code.
http://www.php.net/manual/en/features.file-upload.errors.php
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailin
On Fri, 2007-09-21 at 15:51 +1000, Chris wrote:
> (Personally I'd use perl over php for processing files that large but
> that may not be an option).
Thanks for all of the suggestions, I seem to have it working quite well
now, although the client has just contacted me and said that they had
"mad
On Fri, 2007-09-21 at 08:34 +0200, Paul Scott wrote:
> Thanks to all for the suggestions - I now have to figure out the best
> way to manipulate every single record in that table (now over 6.5
> million rows) to add in a field (RDBMS function in C - so much
> easier)...
>
Oh, and by the way, add
Chris wrote:
Paul Scott wrote:
On Thu, 2007-09-20 at 09:54 -0300, Martin Marques wrote:
If not, you should just use the COPY command of PostgreSQL (you are
using PostgreSQL if I remember correctly) or simply do a bash script
using psql and the \copy command.
Unfortunately, this has to work
Team,
I am in need of some help.
I would love to get some assistance on this.
I need to start creating a database for my website.
This will be for a fantasy football league website.
To store stats on the database for archive purposes,
And be able to pull them out on html reports.
I wan
As for MySQL, if the table that you are inserting to has any indexes at
all, then each time your insert/update completes MySQL will re-index the
table.
That'll happen for any database (I don't know that it really re-indexes,
rather it has to update the index instead).
Therefor, if you can
Paul Scott wrote:
> Thanks to all for the suggestions - I now have to figure out the best
> way to manipulate every single record in that table (now over 6.5
> million rows) to add in a field (RDBMS function in C - so much
> easier)...
Isn't that just an ALTER ?
/Per Jessen, Zürich
--
PHP Ge
Colin Guthrie wrote:
> I like working with SimpleXML but DomDocument seems more useful in
> some cases (e.g. working with XSLT transforms etc.).
In PHP4 we used the xslt extension (for sablotron), but when this went
away in PHP5, we moved to the DOMDocument stuff, which is working fine.
Seems to
62 matches
Mail list logo