On Wed, 27 Mar 2002, James Taylor wrote:
> I'm trying to do something to the effect of this for a preg_replace statement:
>
> $string = "Hello\n\n\n\n\n\n\nHow are you?\n\n\n\n\n\n\n\nHi";
> $string = preg_replace("/\n\n/", "/\n/", $string);
>
>
> But, it appears the 'replace' portion of the fu
This is just an example. There are some cases where I need the second option
to be a regular expression, the same way that you can do in Perl regex...
On Wednesday 27 March 2002 02:49 pm, you wrote:
> On Wed, 27 Mar 2002, James Taylor wrote:
> > I'm trying to do something to the effect of this
On Wed, 27 Mar 2002, James Taylor wrote:
> On Wednesday 27 March 2002 02:49 pm, you wrote:
>> On Wed, 27 Mar 2002, James Taylor wrote:
>>> I'm trying to do something to the effect of this for a preg_replace
>>> statement:
>>>
>>> $string = "Hello\n\n\n\n\n\n\nHow are you?\n\n\n\n\n\n\n\nHi";
>>> $
Ok, let me try to refine this as the big picture. User enters something into
a form.
We take that form value and convert newlines into though nl2br.
Then, I want the limit the number of consecutive 's a user can enter,
to avoid abuse via a person just holding down enter for a while.
$message
On Wed, 27 Mar 2002, James Taylor wrote:
> Ok, let me try to refine this as the big picture. User enters something into
> a form.
>
> We take that form value and convert newlines into though nl2br.
>
> Then, I want the limit the number of consecutive 's a user can enter,
> to avoid abuse via a
Hm, nevermind my question :) I'm not thinking straight, not enough sleep.
On Wednesday 27 March 2002 02:53 pm, you wrote:
> On Wed, 27 Mar 2002, James Taylor wrote:
> > On Wednesday 27 March 2002 02:49 pm, you wrote:
> >> On Wed, 27 Mar 2002, James Taylor wrote:
> >>> I'm trying to do something t
On Wed, 27 Mar 2002 [EMAIL PROTECTED] wrote:
> I am running php 4.1.1, and when i try to use odbc_fetch_array, it says
> "Call to undefined function"
>
> Why is this?
Maybe your installation of PHP was not built with ODBC support? It's a
compile-time option.
miguel
--
PHP General Mailing Li
Well, why would all the other ODBC function works?
Thanks,
Eric
- Original Message -
From: "Miguel Cruz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 5:58 PM
Subject: Re: [PHP] odbc_fetch_array() Not Available?
> On Wed, 27 Mar 20
On Wed, 27 Mar 2002 [EMAIL PROTECTED] wrote:
>>> I am running php 4.1.1, and when i try to use odbc_fetch_array, it says
>>> "Call to undefined function"
>>>
>>> Why is this?
>>
>> Maybe your installation of PHP was not built with ODBC support? It's a
>> compile-time option.
>
> Well, why woul
David,
There is a better way to do through a similar operator.
$variable = "hello and welcome";
$variable .= " to www.newimagedesign.com";
therefore...
print ($variable);
would result in...
hello and welcome to www.newimagedesign.com
hope this helps.
-Jordan K. Martin
New Image Design
---
Good one.. hehe
Maybe Rasmus was going to notice this, and fix it ;P
Hehe,
Eric
- Original Message -
From: "Miguel Cruz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 6:41 PM
Subject: Re: [PHP] odbc_fetch_array() Not Available?
> O
But hey, who doesn't have em eh? Anyway, here's my predicament. I want to
look for either the string "http://"; or for 1 or more spaces in a string.
Here's the regex I've got
preg_match("/http:\/\/ | [[:space:]]/i",$valToEval);
I can get each test case working individually, but as soon as I c
I don't have that much experience with preg* functions but if that's exactly
how you've got it in your code, shouldn't there be no spaces??
that is:
preg_match("/http:\/\/ | [[:space:]]/i",$valToEval);
* *
\-\both of these should be removed ?
I now recall that ColdFusion's location tag accepts no data parameters, so
you can't pass data to it. It is essentially a redirect. Thus, it may be
doing an HTTP header location under the hood.
In ColdFusion, I may have logic like so:
-
OK!
I don't ge
Hi all,
My company is considering a move from static to db
driven site.
I am looking for a solution to allow URL's to be
structured in "search engine friendly" format [i.e.
http://website.com/region/article/article_id ] as
search engine traffic is very important.
I have found some great resour
Hi I am using this to make sure a page is refreshed when the user uses the back
button of his browser :
When I try on local (Win NT) it works. The page is refreshed.
When I try on an other server (UNIX) it doesn't work.
Is it normal ?
Any idea how I can solve this ?
Thanks for any assistance.
In my experiances ASP didn't handle this task well. I would suggest looking
at www.microsoft.com to see how they accomplish what you are attempting. It
isn't as pretty as Apache handles it but their's works. They accomplish it
by sending the files via querystring and then parsing out the querys
> Hi All,
>
>
> This is my first participation in this group, so my question is I
> write a function in c, but I need use this function and more joined in a
> library make using the command ar rc alexlib.a x.o, but this procedure
show
> a error when I use this in my browser, please anyone
Here is the scenario.
1. I set my browser to block all cookies.
2. I access this script.
3. I am thinking that I should get an error because I presume that
session_start() will attempt to set a cookie (which it appears to do).
(I tried setcookie() too and the cookie was accepted.)
My quest
Hi all,
I've USED fucntions, i've MODIFIED functions, but to date I haven't written
much in the way of reuseable code/functions. I'm at the point now where I
can identify what sort of code could better be controlled by a function
library, and want to get started on creating my own.
However, I'm
I am wanting to know if I can use null to call up an image? I am writing a
page that talks to calls to a database for cars. There a field where calls
on photo names, but if someone doesn't have a photo. Mysql puts null, I want
to be able to use that null to call an image.
--
How do you mean, it didn't work in other cases? Did the file(s) get
included? did they execute? did they execute properly?
I'm thinking, just by looking at it, that the answer to the last question is
"no". The reason why I say that can be shown in a very simple example:
main.php
other.inc
$x\
Now I'm looking to find 1 or more digits in an input:
preg_match("[[:digit:]]",$valToEval);
I'm passing the value "12" and this thing still returns 0. What's going on?
Carl
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Duncan,
Also working with IMAP because I'm writing a webmail. Haven't met this
problem before but if I were you, I'd consider the following steps
1) Check if the IMAP daemon is running. Type "nmap localhost" at your shell
to see if IMAP daemon (port 143, and it appears as imap2 on my server
I have finally figured out why I get logged straight out of tabby as soon as
I log in.
When I log onto tabby (through cc.dev.syd.world.net), I get $SITE_S as
"wtb_tabby" (as it's meant to be) but when
register.syd.world.net/RSEARCH.html loads, it changes it to
"spafinder_trade".
Whoever is doing
oops sorry for that - wrong address!
-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 3:16 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] raven & register & site_s & spafinder
Importance: High
I have finally figured out why I get logged str
Hello,
My problem is I have a form that submits it info to a mysql table, well then I
have a page that calls it from the mysql table and displays whatever is in the
mysql table. So, what script do I use to make it display multiple entrys?? Here
is the code:
---
When using cookies, if you don't set an expiration time, the cookie is only
good until the session expires. It doesn't get saved, and it disappears
when the user closes their browser.
Many browsers have different settings/preferences for session cookies, and
because they don't get saved to your
Hi folks,
Just curious to know if anyone has experienced a high server
load since installing the recent security patch to PHP 4.0.6?
Our Production team is reporting that the web servers running
www.melbourneit.com.au are currently running at a load average
of 30+, and this has been the case sin
Hi,
Just do a test on the result of the image URL field, and if the field value
is "null" (or ""), change the field to a default image URL...
";
?>
Justin French
Creative Director
http://Indent.com.au
on 28/03/02 2:32 PM, Chuck "PUP" Payne ([EMAIL
I don't really see how that patch could cause that. Any chance of an
truss or a gdb backtrace or something on one of these guys to give us a
clue?
-Rasmus
On Thu, 28 Mar 2002, Jason Murray wrote:
> Hi folks,
>
> Just curious to know if anyone has experienced a high server
> load since installi
Hi,
I need confirmation on this matter :
The scripts I use to upload files work fine until the file exceed 7 M.
No specific error message appears.
The hidden input MAX_FILE_SIZE is included in the scripts.
My scripts are running on php 4.1.2.
The php.ini file is set up as follow :
max
preg syntax is different to ereg (which you are using). You also need to
provide an output variable.
This would work:
preg_match( "/[0-9]+/", $input, $output );
--
Matt
"Carl E Shmidt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Now I'm looking to find
> Is it because of the memory_limit that it doesn't work ?
Yes
> Do I have a way to upload files (over 7M) on the server without increasing the
> memory_limit ?
Not until PHP 4.2
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Thursday 28 March 2002 05:20, Erik Price wrote:
> On Wednesday, March 27, 2002, at 04:11 PM, Matt Friedman wrote:
> > When you have all your items in an array use implode to add a character
> > in between every item.
> >
> > $str = implode($yourArray, $separator);
> >
> > This will add the sep
In Visual Basic there is a function called left.
usage: left(string, len)
It allows you to get the first 'len' characters of 'string'.
Is there a similar function in PHP?
I have a value:
"3.405"
That I just want to crop to "3.40"
If I pass "3.405" to MySQL it adds it like this: "3.41"
Thanks
-D
Hi, I am trying to write a file that contains a shell script. The file
writes to the server but when I try to execute it it fails with a command
not found error. But if I copy and paste the files contents into a new text
file using Textpad on my PC and upload it to the same directory it works?!
It
On Sat, 23 Mar 2002, Donald wrote:
> In Visual Basic there is a function called left.
> usage: left(string, len)
> It allows you to get the first 'len' characters of 'string'.
>
> Is there a similar function in PHP?
>
> I have a value:
> "3.405"
> That I just want to crop to "3.40"
> If I pass "
On Wed, 27 Mar 2002, Dalton Hunter wrote:
> Hi, I am trying to write a file that contains a shell script. The file
> writes to the server but when I try to execute it it fails with a
> command not found error. But if I copy and paste the files contents into
> a new text file using Textpad on my PC
Hi,
Does anyone have php scripts/program that can be used to access PINE
mails (LINUX) from Netscape browser?
Please help
Thank you in advance
vim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wed, 27 Mar 2002, Dalton Hunter wrote:
> > Hi, I am trying to write a file that contains a shell script. The file
> > writes to the server but when I try to execute it it fails with a
> > command n
On Wed, 27 Mar 2002, Dalton Hunter wrote:
> "Miguel Cruz" <[EMAIL PROTECTED]> wrote:
>> Make sure you use unix-style line endings (just \n and no \r).
>
> Hi, thanks for your reply. I should have been a little clearer. The file is
> created as a result of a PHP script not in TextPad. I am only co
On Thursday 28 March 2002 15:03, Dalton Hunter wrote:
> them in Textpad afterward. For example the script contains ...
>
>
> // BEGIN PHP SCRIPT THAT GENERATES SHELL SCRIPT
>
> $sbackup = "#!/bin/sh
Do you actually terminate each line of your shell script with \n?
ie shouldn't that be:
$sback
On Thu, 28 Mar 2002, Miguel Cruz wrote:
> Right. I think the "No such file or directory" message is because it's
> failing to find an interpreter called "/bin/bash\r".
Sorry, I mean "/bin/sh\r". Habit.
miguel
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 28 Mar 2002, Miguel Cruz wrote:
> > Right. I think the "No such file or directory" message is because it's
> > failing to find an interpreter called "/bin/bash\r".
>
> Sorry, I mean "/bin/sh\r
Hi there,
I am trying to get the php news on my apple machine. The newsgroups are
listed and I can connect to the newsserver. Signing up for a newsgroup
works, too. But the trouble starts, when I try to read the news. I am
getting the message: can't find server
did anybody experiance the same pr
Hey,
I tried to open a php file on my server that dosn't exist and php gave me a
404 error.
I am running w2k, apache, php 4.1.2 as a module.
Try having them run the php as a mod. with apache (if possible).
-Donald
www.magentica.com
--
PHP General Mailing List (http://www.php.net/)
To unsubs
I'm trying to split results into different pages and number the pages
accordingly. I'm using PHP and accessing a MsSQL database. I've been able to
build a fairly intelligent page numbering system which knows which rows it
should pull (at least by numbering each row numerically) but I don't know
ho
Hello,
i want to write some application that requires users login.
So i have question how i can check duplicity login (eg. browser crash,
login from one computer using two browsers, ...). I need some idea
(the best will be some example code :) ).
Thank you.
Michal Dvoracek
For example use session_ids. This does not mean that use MUST use PHP session module.
Store a unique string in the DB and set it as
cookie for the user. When someone logs generate a string, write it in the members
table and old session is removed, so the user with
old session will be not able to
101 - 150 of 150 matches
Mail list logo