$sendmail_path = @ini_get('sendmail_path');
if (!$sendmail_path)
{
// no sendmail, so we're using SMTP to send mail
$delimiter = "\r\n";
}
else
{
$delimiter = "\n";
}
in vBulletin
2005/9/27, Si
You have to view the file through the IIS server, not directly. So once
you have IIS configured to work with PHP you can access it by typing
http://127.0.0.1/filename in your browser.
Opening the file directly means that it doesn't get passed through the
IIS server and never gets parsed by PHP.
Morning,
I'm missing something...
I've done everything and can't get PHP to run on IIS/PWS 5 on Windows 2000.
If I double click on the PHP file, then the browser opens and displays my
PHP script without interpreting it. What am I missing?
Also, trying to find the correct place/person to ask this q
> I guess to only way to solve my problem is to write my own extension to
> initialize my objects in my own memory (even can keep them in local memory, as
> long as they are persistent across requests). You mentioned to write a MINIT
> hook; could you give some more details? Is there any document
I have been working on making my contact forms more secure. In my research,
the occurence of the new line character \n at the end of the $headers variable
in the mail function seems to be a security risk and opens one up to injection
of spam email. This part I understand. I have been unable
Chris Boget said the following on 09/27/05 14:41:
> I'm running a freshly installed Redhat 9, kernel version 2.4.20. Well,
> at least
> that's what rpm is reporting though I know the up2date utility (supposedly)
> updated my kernel as well.
>
> Has anyone else had problems similar to this? If s
see below...
"Jochem Maas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> see below..
>
> Scott Fletcher wrote:
> > "Jochem Maas" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> >>Mike Dunlop wrote:
> >>
> >>>On Sep 27, 2005, at 10:22 AM, Scott Fletcher wrote:
:-)
"Mike Dunlop" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> My bad - that doesn't work - that came off the top off my head. It
> sure did look sexy though, no ?
>
> - MD
>
>
> >> echo ${"array".$prefix};
> >>
> >
> > really? did you test that?
> > doesn't work when I do it (t
Le 27-sept.-05 à 23:52, Philip Hallstrom a écrit :
http://us3.php.net/manual/en/function.wordwrap.php
thanks a lot!
$newtext = wordwrap($row[1], 50, "\n");
echo $newtext;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
bit off the point but...
Oliver Grätz wrote:
Ross schrieb:
$width = " document.write(screen.width); ";
//$ross= intval($width);
Yes, this is and will always be zero, because you are evaluating a
for his paricular $width string, yes.
string to an integer value.
$butThereIsAlwaysAtLea
My bad - that doesn't work - that came off the top off my head. It
sure did look sexy though, no ?
- MD
echo ${"array".$prefix};
really? did you test that?
doesn't work when I do it (the second expression does
- but doesn't answer the OPs question actually imho the
answer is not eval() e
if "chunk_split" function split the line of text (here on 50 char)
I was wondering if there exists one function who take care if
the 50 char is in the middle of the word and split the line
first "empty space" before the word or just after?
$newstring = chunk_split($row[1], 50, '');
echo $newstrin
Hi,
if "chunk_split" function split the line of text (here on 50 char)
I was wondering if there exists one function who take care if
the 50 char is in the middle of the word and split the line
first "empty space" before the word or just after?
$newstring = chunk_split($row[1], 50, '');
echo $n
see below..
Scott Fletcher wrote:
"Jochem Maas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Mike Dunlop wrote:
On Sep 27, 2005, at 10:22 AM, Scott Fletcher wrote:
[code]
$array = array();
$array['col1']['col2'] = "Test #1";
$array['col3']['col2'] = "Test #2";
$prefix
On Sep 27, 2005, at 5:23 PM, M. Sokolewicz wrote:
Charles Kline wrote:
On Sep 27, 2005, at 3:42 PM, Andy Pieters wrote:
Hi
Without you actually showing us these class files we can only
guess but a
common mistake is this:
mysql_open(connection details)
mysql_query(query)
In those cas
So I'm trying to install PHP with XML support. During configuration, I
get
an error saying I need a newer version of libxml2. So I download
libxml2-2.6.22-1.i386.rpm and try to upgrade. No go as I get failed
dependancies. I then also download libxml2-devel-2.6.22-1.i386.rpm and
libxml2-python
So I'm trying to install PHP with XML support. During configuration, I get
an error saying I need a newer version of libxml2. So I download
libxml2-2.6.22-1.i386.rpm and try to upgrade. No go as I get failed
dependancies. I then also download libxml2-devel-2.6.22-1.i386.rpm and
libxml2-python-
Ross schrieb:
> $width = " document.write(screen.width); ";
> //$ross= intval($width);
Yes, this is and will always be zero, because you are evaluating a
string to an integer value.
> echo $width;
> if ($width < 1064) {
> echo "lower";
> $style= "style1.css";
>
> }
> else {
> $style= "style2.cs
Hi
As a complement to the answers you have had here I wish to ammend the
following.
The Run in the example is a function, and because this function is inside a
Class object, it is called a method.
A class is a set of variables (properties) and functions (methods) that you
can create instances
Charles Kline wrote:
On Sep 27, 2005, at 3:42 PM, Andy Pieters wrote:
Hi
Without you actually showing us these class files we can only guess
but a
common mistake is this:
mysql_open(connection details)
mysql_query(query)
In those cases the last opened handle is used. To prevent this,
Hi Rasmus,
Thanks a bunch for your kind help! Yes, you got exactly what I meant.
I have my own classes to hold all the xml related data, so it might be a bit
too difficult for me to convert my existing applications to use nested array
instead. I tried to use apc to store nested array though, an
On Sep 27, 2005, at 3:42 PM, Andy Pieters wrote:
Hi
Without you actually showing us these class files we can only guess
but a
common mistake is this:
mysql_open(connection details)
mysql_query(query)
In those cases the last opened handle is used. To prevent this,
use this
syntax
$db
On Sep 27, 2005, at 4:19 PM, Jasper Bryant-Greene wrote:
Lowell Herbert wrote:
Thanks for all the responses. I understand that $site is an
instance of the class CSite, and that Run() is a function in that
class. I do not understand what the operater "->" means, and
what meaning the
Lowell,
The "->" operator was taken from the pointer operator in C. It's used to
access a method or variable within an INSTANCE of an object, as opposed to
the "::" operator, which is used to access a static method of a class. Note
the difference between a class and an object -- an object is
Lowell Herbert wrote:
Thanks for all the responses. I understand that $site is an instance
of the class CSite, and that Run() is a function in that class. I do
not understand what the operater "->" means, and what meaning the
result of the function Run() has to $site. Clarification anyo
"Jochem Maas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Mike Dunlop wrote:
> > On Sep 27, 2005, at 10:22 AM, Scott Fletcher wrote:
> >
> >> [code]
> >> $array = array();
> >>
> >> $array['col1']['col2'] = "Test #1";
> >> $array['col3']['col2'] = "Test #2";
> >>
> >> $pre
On Sep 27, 2005, at 2:16 PM, Mikey wrote:
Lowell Herbert wrote:
I'm trying to expand my understanding of PHP by looking at some
pre- built code modules. I don't fully understand the syntax
"$site->Run ();" in the following code. Can someone offer a
helpful explanation?
Run();
?>
Wow, that seem to work... Should have use "$suffix" instead of "$prefix" to
make it less confusing.
"Silvio Porcellana" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Scott Fletcher wrote:
>
> >What I want this to work instead is
> >[code]
> > $array = array();
> >
> > $array['co
Hi
Without you actually showing us these class files we can only guess but a
common mistake is this:
mysql_open(connection details)
mysql_query(query)
In those cases the last opened handle is used. To prevent this, use this
syntax
$db1=mysql_open(connection for db1);
$db2=mysql_open(connecti
Mike Dunlop wrote:
On Sep 27, 2005, at 10:22 AM, Scott Fletcher wrote:
[code]
$array = array();
$array['col1']['col2'] = "Test #1";
$array['col3']['col2'] = "Test #2";
$prefix = "['col3']['col2']";
echo $array.$prefix; //Spitted out result as "Test #2"...
[/code]
This is the simp
- Original Message -
From: "Charles Kline" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, September 27, 2005 8:25 PM
Subject: [PHP] Two MySQL connections in one script not working as expected
Hi all,
I have a script that needs to update data in two databases. My db
connections are both in
[snip]
I have a script that needs to update data in two databases. My db
connections are both in class files that I created to execute the
various connections and queries.
What is happening is that the second database connection does not
seem to work. The error I get is that it seems the sec
Hi all,
I have a script that needs to update data in two databases. My db
connections are both in class files that I created to execute the
various connections and queries.
What is happening is that the second database connection does not
seem to work. The error I get is that it seems the
Hi all
Is there someone with expierence on how to upload a binary file in php?
I am using php 5 cli engine and the scripts keeps trowing errors, but only if
the file is a binary. Text files upload without problem.
It keeps telling me 'STOR' not understood.
I tried putting in passiv mode and I
Thanks for the thoughts -- some good points! I will let you know if I
come up with anything that works, please let me you know if you do
the same :)
Best,
Mike D
...
Mike Dunlop
Director of Technology Development
[ e ] [EMAIL PR
Lowell Herbert wrote:
I'm trying to expand my understanding of PHP by looking at some pre-
built code modules. I don't fully understand the syntax "$site->Run
();" in the following code. Can someone offer a helpful explanation?
Run();
?>
Run() is a method of the CSite class - you will ne
Havn't done it myself, but why not try pasting a link in IM and have it go to a
php script that does a var_dump (or print_r) of $_SERVER. Think that's where
the referrer data is.
It may not show any referrer information since it's coming from an IM, but who
knows.. would be interesting to tr
On Sep 27, 2005, at 10:22 AM, Scott Fletcher wrote:
[code]
$array = array();
$array['col1']['col2'] = "Test #1";
$array['col3']['col2'] = "Test #2";
$prefix = "['col3']['col2']";
echo $array.$prefix; //Spitted out result as "Test #2"...
[/code]
This is the simple code that I'm try
Scott Fletcher wrote:
>What I want this to work instead is
>[code]
> $array = array();
>
> $array['col1']['col2'] = "Test #1";
> $array['col3']['col2'] = "Test #2";
>
> $prefix = "['col3']['col2']";
>
> echo $array.$prefix; //Spitted out result as "Test #2"...
>[/code]
>
>
Try something li
Here is something simple that I want it to work.. Not sure how to do this
exactly...
Code #1
[code]
$array = array();
$array['col1']['col2'] = "Test #1";
$array['col3']['col2'] = "Test #2";
echo $array['col3']['col2']; //Spitted out result as "Test #2"...
[/code]
What I want this to w
I know that referrer is an ENV variable carried by web browsers but I
am wondering if any of you guru's have figured out a way to track any
referrer al information from a link pasted into an instant messenger
(AIM) window.
Anyone have any ideas on this?
Much Thanks,
Mike D
...
I'm trying to expand my understanding of PHP by looking at some pre-
built code modules. I don't fully understand the syntax "$site->Run
();" in the following code. Can someone offer a helpful explanation?
Run();
?>
The $site variable is an object, specifically an instance of the
CSite c
I'm trying to expand my understanding of PHP by looking at some pre-
built code modules. I don't fully understand the syntax "$site->Run
();" in the following code. Can someone offer a helpful explanation?
Run();
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: h
On Sep 27, 2005, at 12:07 PM, Charles Kline wrote:
I am confused on how to get to the data in this object, anyone help
me out?
here is the result of my var_dump() which is inside a class
function functionTest($data){ var_dump($data); }
object(staff)(2) {
["arrStaff"]=>
array(12) {
I am confused on how to get to the data in this object, anyone help
me out?
here is the result of my var_dump() which is inside a class function
functionTest($data){ var_dump($data); }
object(staff)(2) {
["arrStaff"]=>
array(12) {
["bsStaffID"]=>
string(4) "9090"
["bsLastNam
It seems the best way to do this would be a predefined constant. You'd just
need to update the constant whenever you move to a new Operating System.
Then, just always append the constant to your strings:
//change for linux or windows
define('CRNL',"\r\n);
//define('CRNL',"\n);
print "foobar".C
On Tue, Sep 27, 2005 at 10:40:06AM -0400, Jake Gardner wrote:
> This is a stretch and I doubt you can do this very easily, but I was
> wondering if there is a way to define behaviors that happen throughout
> a script before execution for example if the OS is windows, all
> strings are terminated wi
Jake Gardner wrote:
> This is a stretch and I doubt you can do this very easily, but I was
> wondering if there is a way to define behaviors that happen throughout
> a script before execution for example if the OS is windows, all
> strings are terminated with \r\n, if Linux, then \n without adding
In larger applications, I prefer to serialize the array because it allows
you to store the data in _any_ variable, not just the pre-named variable.
For example, if your page is already using a variable named $user_settings,
you would run into problems with your solution. My solution allows you
Cool...that's exactly what I was looking for!!
"Torgny Bjers" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Chris wrote:
>> I'd like to save some program preferences to a txt file where they can be
>> recalled and updated at a later time. Basically this will be a variable
>> name
>
This is a stretch and I doubt you can do this very easily, but I was
wondering if there is a way to define behaviors that happen throughout
a script before execution for example if the OS is windows, all
strings are terminated with \r\n, if Linux, then \n without adding
addition ifs throughout the
On 9/27/05, Chris <[EMAIL PROTECTED]> wrote:
> I'd like to save some program preferences to a txt file where they can be
> recalled and updated at a later time. Basically this will be a variable name
> and a value. Can someone suggest a reference or method to best perform this
> task?
While learni
A.J. Brown wrote:
Are you wanting the preferences to be real-time changeable? For example,
user preferences that can be modified then saved? If so, just store them in
an array, then serialize the array and save it to a file. Read the file at
every page load.
[code]
//save the settings
$us
Are you wanting the preferences to be real-time changeable? For example,
user preferences that can be modified then saved? If so, just store them in
an array, then serialize the array and save it to a file. Read the file at
every page load.
[code]
//save the settings
$user_settings['setting
Chris wrote:
> I'd like to save some program preferences to a txt file where they can be
> recalled and updated at a later time. Basically this will be a variable name
> and a value. Can someone suggest a reference or method to best perform this
> task?
>
> Thanks
> Chris
> BTW: I do not want t
Hi,
I know I should not top post, but here it goes anyway:
just wanted to say thanks and let others know that it is SOLVED.
Cool thing this function! Gotta love PHP (thank heavens I don't need to use
jsp right now ...)
T
-Original Message-
From: Mikey [mailto:[EMAIL PROTECTED]
Sent: 2
[snip]
I'd like to save some program preferences to a txt file where they can be
recalled and updated at a later time. Basically this will be a variable name
and a value. Can someone suggest a reference or method to best perform this
task?
[/snip]
Open a new file, save stuff to it, close the fi
- Original Message -
From: "A.J. Brown" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, September 27, 2005 3:26 PM
Subject: Re: [PHP] passing a variable with php_self
">
works well too
--
Sincerely,
A.J. Brown
"Jim Moseby" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
---
A.J. Brown wrote:
">
works well too
works only if register_globals is on, doesn't it?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thomas wrote:
Hi,
I want to find out if it is possible to get the file name and the line
number of a calling script (__FILE__, __LINE_) from a calling class
automatically.
Let me explain:
I have a db class which gets called in other classes. Now, when an sql error
occurs I would like to find o
I'd like to save some program preferences to a txt file where they can be
recalled and updated at a later time. Basically this will be a variable name
and a value. Can someone suggest a reference or method to best perform this
task?
Thanks
Chris
BTW: I do not want to use MySql.
--
PHP Genera
Thomas wrote:
Hi,
I want to find out if it is possible to get the file name and the line
number of a calling script (__FILE__, __LINE_) from a calling class
automatically.
Let me explain:
I have a db class which gets called in other classes. Now, when an sql error
occurs I would like to find
">
works well too
--
Sincerely,
A.J. Brown
"Jim Moseby" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> -Original Message-
>> From: Ross [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, September 27, 2005 8:58 AM
>> To: php-general@lists.php.net
>> Subject: [PHP] passing a
all u need is debug_backtrace()
On 9/27/05, Thomas <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I want to find out if it is possible to get the file name and the line
> number of a calling script (__FILE__, __LINE_) from a calling class
> automatically.
>
> Let me explain:
>
> I have a db class which ge
> I want to find out if it is possible to get the file name and the line
> number of a calling script (__FILE__, __LINE_) from a calling class
> automatically.
debug_backtrace contains that info.
http://www.php.net/debug_backtrace
--
Scott Noyes
[EMAIL PROTECTED]
--
PHP General Mailing List (ht
Ross wrote:
> can someone show me the right way to do the following...
>
>
>
> I want to pass a variable to a self submitting link.
Easiest way to do that is to use sprintf() or printf():
%s', $_SERVER['PHP_SELF'],
$link_title);
?>
Or, like you did with inline code in the HTML:
click my
sel
> -Original Message-
> From: Ross [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 27, 2005 8:58 AM
> To: php-general@lists.php.net
> Subject: [PHP] passing a variable with php_self
>
>
>
> can someone show me the right way to do the following...
>
>
>
>
> I want to pass a variab
[snip]
can someone show me the right way to do the following...
I want to pass a variable to a self submitting link.
[/snip]
echo $_GET['action'] . "\n";
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
can someone show me the right way to do the following...
I want to pass a variable to a self submitting link.
Thanks,
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I want to find out if it is possible to get the file name and the line
number of a calling script (__FILE__, __LINE_) from a calling class
automatically.
Let me explain:
I have a db class which gets called in other classes. Now, when an sql error
occurs I would like to find out which file a
[snip]
[snip]
Okie dokie, I am losing it I am surebut that's not important now.
I finally configured the IIS Virtual SMTP server as my MTA. No errors are
being thrown, but no mail is being sent either. Well, it may being sent, but
it is not arriving at its destination. Can someone clue me into
FSA wrote:
> Hi all, i have a question :), i need to display the instant value of a
> variable (think at a variable that stores the interface trafic at one
> moment) in browser, without having to refresh browser. I was wondering
> if i can do that with php (not perl, cgi, etc).
> If i missed someth
Hi all, i have a question :), i need to display the instant value of a
variable (think at a variable that stores the interface trafic at one
moment) in browser, without having to refresh browser. I was wondering
if i can do that with php (not perl, cgi, etc).
If i missed something in my description
> -Original Message-
> From: Denis Gerasimov [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 27, 2005 1:45 AM
> To: PHP General Mailing List
> Subject: [PHP] PHP CLI - possible for mass mailing?
>
>
> Hello List,
>
>
>
> We are working on a PHP project that implements mass mailin
On 9/27/05, Bulent <[EMAIL PROTECTED]> wrote:
> here is the concerning line;
> about line "mysql_close($sonuc3);"
>
> @mysql_connect($server,$kullanici,$sifre) or die("sql server baglanamadi");
> @mysql_select_db($vt) or die("tabloya baglanamadi");
> $sonuc3=mysql_query($sorgu3) or die("dosya açila
Hello
###
// Builds the sql insert query
$fieldlist = ereg_replace(', $', '', $fieldlist);
$valuelist = ereg_replace(', $', '', $valuelist);
$query= 'INSERT INTO' . ' (' $query . $fieldlist . ') VALUES (' .
$valuelist . ')';
$message = $strInsertedRows . '
On 9/27/05, Bulent <[EMAIL PROTECTED]> wrote:
> Hello
>
> I am a novice about that
> I use mysql4.0.24 with php4.3.10.
> When I upload jpeg/gif files to my webpage I get an error as below;
> PHP Warning: mysql_close(): supplied resource is not a valid MySQL-Link
> resource in /var/.
> What
Bulent wrote:
Hello
I am a novice about that
I use mysql4.0.24 with php4.3.10.
When I upload jpeg/gif files to my webpage I get an error as below;
PHP Warning: mysql_close(): supplied resource is not a valid MySQL-Link
resource in /var/.
What shall I do ?
look at the line with the err
Hello
I am a novice about that
I use mysql4.0.24 with php4.3.10.
When I upload jpeg/gif files to my webpage I get an error as below;
PHP Warning: mysql_close(): supplied resource is not a valid MySQL-Link
resource in /var/.
What shall I do ?
My php configuration as below;
GD Suppor
javascript is a client-side language, while php is a server-side
language... the value you are passing to $width only exists on the
client side, therefore the php server-side boolean fails.
i think you will have to pass the client-side calculated variable of
screen.width to the php server b
Ross wrote:
This returns the correct value for $width but falls down on the boolean. I
have tried intval/srtval but nothing seems to work.
Maybe it is too early!
$width = " document.write(screen.width); ";
You know that PHP runs on the server, right? So how exactly is it
supposed to find o
This returns the correct value for $width but falls down on the boolean. I
have tried intval/srtval but nothing seems to work.
Maybe it is too early!
$width = " document.write(screen.width); ";
//$ross= intval($width);
echo $width;
if ($width < 1064) {
echo "lower";
$style= "style1.css";
}
el
Jasper Bryant-Greene wrote:
David Pollack wrote:
Ok, so this is the actual code that I'm using.
preg_match_all("/-?([\d]+)?(\.[\d]+)?/", $string, $matches);
^^-delimiters
you can use almost any char you like (beware of chars that have
special
Rasmus Lerdorf wrote:
Jasper Bryant-Greene wrote:
Have you looked at memcache?
http://www.php.net/manual/en/ref.memcache.php
He did say that serialization wasn't an option and you can't use memcached
without serializing. You may not realize you are serializing, but the memcache
extension s
Kevin Wang wrote:
> My php5 web application needs to parse/marshall a bunch of large xml files
> into
> php5 objects at the beginning of handling each request. These xml files are
> static across all the requests and it is really time consuming to
> parse/marshall them into php5 objects.
What so
Denis Gerasimov wrote:
> We are working on a PHP project that implements mass mailing to a large
> number of its subscribers (expected 100,000-200,000 users; not spam mailing
> BTW). So I am wondering if it is possible to use PHP CLI binary for this
> purpose and if there are any problems with PHP
86 matches
Mail list logo