ereg_replace or str_replace perhaps?
eg
$something= this is a sentence;
$something = ereg_replace ( ,+, $something);
print $something;
-Original Message-
From: Egon Schmid [mailto:[EMAIL PROTECTED]]
Sent: September 14, 2001 2:20 PM
To: Alexander Skwar
Cc: murat; [EMAIL PROTECTED]
On Fri, 14 Sep 2001 [EMAIL PROTECTED] wrote:
ereg_replace or str_replace perhaps?
eg
$something= this is a sentence;
$something = ereg_replace ( ,+, $something);
print $something;
That'll work, although str_replace is faster and better...
fyi, if you want to encode a string
you can use strrchr to find the extension, like this:
if ($file != .htaccess $file != . $file != ..
strrchr($file,.) != .php)
Try to see php manual, probably i mispelled it.
--
Federico
[EMAIL PROTECTED]
--
Christopher Cm Allen [EMAIL PROTECTED]
I'd use preg_match().
Something like should do the trick:
if ($file != .htaccess $file != . $file != ..
!preg_match(/(.*)\.php/i, $file))
Niklas
-Original Message-
From: --- [mailto:[EMAIL PROTECTED]]
Sent: 14. syyskuuta 2001 11:09
To: [EMAIL PROTECTED]
Subject: [PHP] R: File
In fact I just made a simple mistake. I had forgotten to put
ENCTYPE=multipart/form-data. So there was no file, therefore no data like
size, nor the type either.
Thanks anyhow.
RNie
Richard Lynch [EMAIL PROTECTED] wrote in message
Wonderful image
-
Federico
[EMAIL PROTECTED]
-
Miroslav Hudak [EMAIL PROTECTED] wrote in message
01c13cae$1144c460$[EMAIL PROTECTED]
Hi!
I've made a background image devoted to all people who are feeling the
pain with the people of United
what are you trying to do?
why do you want to diffirentiate between 99 as a string or as a number?
Chris Boget [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Sample code:
script language=php
$array = array( one, two, three );
while( list( $key, $val ) =
Hi,
I trying to write a php program using mysql to dump the data to capture
the following details:
1. From where the viewer is coming. Easy getting the remote address
2. Which file they are viewing. Ok think I can handle this.
3. How long they are on that particlular page?
4.
I am working on a web-site which has a bunch of layers and a java script which
controls their appearance. That means that I have the whole site in one html.
The problem appeared when I tried to put php code inside a DIV tag. In that case
only that layer was visible. I don't know weather php and
Hi all,
This is what I have at the top of my php page (php-4.0.6-winNT).
html
head
?php
header(Location:index.php);
setcookie(Cookievalue, abcdefghijklmnopqrstuvwxyz0123456789)
time()+3600);
?
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
Hi George,
You must output all headers (including cookies) before you output any
content.
So, you just need to move your header and setcookie calls so they are above
the html and head tags.
e.g.
?php
header(Location:index.php);
setcookie(Cookievalue, abcdefghijklmnopqrstuvwxyz0123456789)
Kelly,
Thanks for the tip but having re-arranged my code I still get the same
message.
New coding =
?php
header(Location:index.php);
setcookie(Cookievalue, abcdefghijklmnopqrstuvwxyz0123456789,
time()+3600);
?
html
head
titleUntitled Document/title
meta http-equiv=Content-Type
So sprach »Egon Schmid« am 2001-09-14 um 08:20:11 +0200 :
Alexander, please don't try to educate people with a RTFM. Your solution
to the above problem is obviously wrong.
Yes, that's right. I misunderstood the question, sorry about that.
Alexander Skwar
--
How to quote:
Do you have any white spaces or carriage returns before your headers? If so
get rid of them.
- Original Message -
From: George Pitcher [EMAIL PROTECTED]
To: Kelly Barrett [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, September 14, 2001 3:21 AM
Subject: Re: [PHP] another easy cookie
Hi,
Thanks. Instead of using next and previous I am giving the page number at
the bottom of the page (see lastminute.vvmm.net/nextweek.php). The
problem is that if there are, say 35 pages, the page numbers go off the
screen. This is the snippet:
if ($nopage=$limit)
Daniel, if you like mine
http://www.lamundial.net/pics/view.php
tell me and I'll post the necesary php files
Ani Lopez
www.lamundial.net
download and spread our music
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
If nothing but the header Location ran then it would send him to his page,
but its not even doing that. It's giving him an error before it does that.
He already mentioned he didn't have any html or anything before the headers.
- Original Message -
From: Niklas Lampén [EMAIL PROTECTED]
Probably http://php.resourceindex.com/ ?
- Original Message -
From: Coenraad Steenkamp [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 14, 2001 3:45 AM
Subject: [PHP] Anti Leech Script ??? please
Does anyone know of a anti leech script and where i could get it!
I found the only difference between your script and mine in table tag, but even
when I changed it, the problem remained. I am using DW, but I'm not a java
programmer, and scripts are generated by extensions for dw. That's why I don't
have a clue what's happening.
Another thing ...
I have
Hello
Was anyone ever able to get jdk 1.3.1 from sun running together with
ext/java in php? jdk 1.2.2 was not a big problem, but if i switch to
1.3.1, the scripts do not output anything. not even an entry in the
logfiles is made.
if it's really impossible, i'll stay with 1.2.2 and will not try
This is a pretty funny article:
http://www.bbspot.com/News/2000/6/php_suspend.html
--
Thomas Deliduka
IT Manager
-
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
they are right!
PHP is a drug, once you begin to use it impossible to leave he habit!
no other web programing languaje gives you more for free so let me abuse of
it
Ani Lopez
www.lamundial.net
download and spread our music
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
I don't know if there's already a program that do it, phpOpenTracker makes
something like...
But there aren't some of the features that you require...
1. From where the viewer is coming. Easy getting the remote address
Look at $HTTP_REFERER and $REMOTE_ADDR, phpOpenTracker and Web statistics
I must have deleted the line by accident...
$trocou=true; is right below $vetor[$j+1]=$aux;
would that make sense?
I'm not worried about the optimization here... I want to get time results
for bubblesort... and then I'm going to heap, quick, and others... It's
some college homework for my
Is there more like that?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello Guys,
Do you know where can i find more info on vBulletin Forum hacks(cutom
added features)
Thnxs
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
it's also a joke, in case anyone happens to
take is seriously :-)
-Original Message-
From: Jon Farmer [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 14, 2001 10:01 AM
To: Thomas Deliduka; PHP List
Subject: Re: [PHP] Have y'all seen this?
This is a pretty funny article:
Hi
I am doing a scroll bar with javascript and info pulled from MySQL.
So I execute query and create an array with php called messages. Then
when my page is loaded I guess this array should be available to
JavaScript under the same name except the $. Am I right here or not?
The java script
i am using a global variable (curClass),
which is a reference to some class,
inside another class i want to change
the value of this global variable, to
point or refer to another class.
but that doesnt work.
am i doing something wrong???
here my code
--
class temp
{
$search = imap_search ($mail, TO reply, SE_UID);
returns the same values as
$search = imap_search ($mail, TO reply);
search whorks ok, but it doesnt return message
id's. or this is imap-only flag and it won't work
with pop3 connection?
--
Andrew Perevodchik
[EMAIL PROTECTED]
--
PHP
Did the assignment require this to be done in a non-standard
way? If not, then you are over complicating a fairly simple
algorithm. Just use two nested For loops as Richard
suggested. If the assignment requires you to do it with
a while loop (though for the life of me I can't imagine
why it
Hello all! I a relatively newbie in PHP, so my question may appear silly:
Please tell me if anyone has knowledge of
authenticating a user based on his username and password
from Linux system (shadow or anything).
I want to make a php WebMail. Also, i want to make
a ssh virtual web client for
JavaScript has no idea what PHP does... it doesn't even know PHP exists.
So your PHP script has to output your JavaScript in its entirety.
You need to have a line that not only defines message as an array, but
populates it. I would put a for loop after your reset($messages) line
that echo's
On Friday 14 September 2001 17:01, you wrote:
if you want to work with the passwords that originally are in the shadow-file
your webserver needs to have read-permissions for the shadow-file, which is
no good idea.
you could parse out the passwords from the shadow-file and write them into an
This has nothing to do with PHP.
Find a good HTML reference page on the net and look up input and
TABINDEX
http://www.idocs.com/tags/forms/_INPUT_TABINDEX.html
[EMAIL PROTECTED] wrote:
I have a web page that is generated by a php script and on this page
there are several html text entry slots
George Pitcher wrote:
?php
header(Location:index.php);
setcookie(Cookievalue, abcdefghijklmnopqrstuvwxyz0123456789,
time()+3600);
A couple of things:
First, I believe Location: must have a space after it, as well as a
fully qualified URL (ie. http://wherver.com/index.php).
Second, once
What permissions would I set a php file to that could only be ready by
somebody logged into the server as root but still be executed via a website?
is this possible?
Thanks
Randy
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version:
does not execute until the remainder
of the script has executed...
How can I redirect the user:
header(Location: http://www.foo.bar\n\n;);
and continue to execute a set of commands
after the redirection?
Just having the redirection code before the other code does not work.
Linux running
I'm having trouble with formating the html output. I have the black
background, and in function
function javni(){
echo font color=#FFovo je javna strana /font ;
}
I get the parse error in the last function line. If I remove the font
tag, it works ok, but the text is black as well.
body
So sprach »Power Programmer« am 2001-09-14 um 13:06:05 -0700 :
What permissions would I set a php file to that could only be ready by
somebody logged into the server as root but still be executed via a website?
root can always read each and everything, so you don't have to care
about this
Testing
Hi guys,
I got your mail id from typo3.com discussion board. I have installed php4.0.6 in my
system, i am working on winNT environment with Apache as my web server. The php is
working great, i have also enabled gd library and i am able to run some of my image
program, it is great.
- Original Message -
From: karthikeyan
To: [EMAIL PROTECTED]
Sent: Friday, September 14, 2001 10:24 PM
Subject: PHP, GD, FreeType, ImageMagic
Hi guys,
I got your mail id from typo3.com discussion board. I have installed php4.0.6 in my
system, i am working on winNT environment
The way I see it is that your script never has a chance to set the cookie
plus you can not send headers after html, one other thing is that you have a
) at the end of your setcookie function value so if you reformatted it
this way:
?
setcookie(Cookievalue, abcdefghijklmnopqrstuvwxyz0123456789,
So sprach »Nikola Veber« am 2001-09-15 um 07:09:20 +0200 :
I'm having trouble with formating the html output. I have the black
background, and in function
function javni(){
echo font color=#FFovo je javna strana /font ;
Here, PHP stops parsing the string which is to be printed by echo
Richard Lynch
http://php.net/dl
php --help
but... can I use this to open a 'normal' dll ( not a php extension ) and
extract a function with 'dlsym' ?
Rich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hi,
I'm trying to unzip a file and save the unzipped data in a variable in PHP
using :
$result = system ( gzip -d -c myfile.gz ); /* 'gzip -d -c' unzips the
file to 'stdout' */
the above command outputs the result directly to browser instead of putting
it in $result.
I tried exec() too but
echo font color=#FFovo je javna strana /font ;
AS Here, PHP stops parsing the string which is to
AS be printed by echo right before the #FF.
AS You either need to break your fingers and
AS write:
AS echo font col=\#ff\.;
AS or have it much simpler, faster and better
So sprach »Andrew Perevodchik« am 2001-09-14 um 22:15:40 +0300 :
Or try something like this (but i'm shure you
won't want to use it :)
echo END
Oh, right, totaly forgot about here-docs :) What's the use of it
anyhow? I mean, normal strings (double-/singlequotes) can also span
multiple
AS Oh, right, totaly forgot about here-docs :)
AS What's the use of it anyhow? I mean, normal
AS strings (double-/singlequotes) can also span
AS multiple lines.
The only reason i see -- you don't have to escape
any quotes. You can just paste a piece of HTML and
insert variables in there without
So sprach »Andrew Perevodchik« am 2001-09-14 um 22:34:02 +0300 :
The only reason i see -- you don't have to escape
any quotes. You can just paste a piece of HTML and
insert variables in there without ?=...? ;)
Yep, that's the only reason I see for here-docs as well.
Alexander Skwar
--
How
On Fri, 14 Sep 2001 20:22:07 +0200, Alexander Skwar wrote:
So sprach »Nikola Veber« am 2001-09-15 um 07:09:20 +0200 :
I'm having trouble with formating the html output. I have the
black
background, and in function
function javni(){
echo font color=#FFovo je javna strana /font ;
Here, PHP
Hi,
This is kind of off topic but I need to monitor the traffic in
kilobytes/bits on my net card adapter (in/out) or server (PHP, HTML,
etc.), do you know of any software? I'm using Win2000.
Thanks,
SED
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
On Friday 14 September 2001 10:17, --- wrote:
There are 3 functions in php that works similar to #include:
include(filename.ext): include filename.ext and parse it like a php
file
require(filename.ext); like include, but it's included only one time,
if the code contains two require with
check out www.mrtg.org for a pre-packaged solution, otherwise check out the
SNMP functions of PHP.
http://www.php.net/manual/en/ref.snmp.php
in either case, you'll need to install the snmp support from your win2000
installation disk.
/* SED asked: */
This
It's my understanding that PHP's normal behavior IS to send the
header when it is encountered in your program, and then continue
running the program (unless you have an exit statement after the
header).
Perhaps you have output buffering turned on?
If that's not the case, please most more
I have configured my PHP with the following
--with-oci8=\XX
--with-nsapi=\XX
--with-gd=\\
--with-ldap
--enable-libgcc
--enable-track-vars
I have just loaded and installed RSA AceAgent on the server to provide us
with token access. Before I loaded this software I was able to view
Despite the fact that PHP's WDDX functions don't support a binary type,
most binary data comes through just fine, and in fact, the WDDX serialize
function can encode certain types of binary data, such as a null
character: char code='00'/
But the deserialize process dos not retain these
Hi. What is the difference between:
if(isset($a))
and
if($a)
??? Thanks.
David
isset checks to see if the $a variable has been set, ie, if it exists.
if($a) checks for the truthood of $a, meaning, if it has a non-zero,
non-null/empty-string value, then its true, else, false.
jack
-Original Message-
From: David Yee [mailto:[EMAIL PROTECTED]]
Sent: Friday, September
require will grab the file no matter what (if it exists), include can be used
in an if else construct.there's probably megabytes of text on this
subject in the archives
Christian Reiniger wrote:
On Friday 14 September 2001 10:17, --- wrote:
There are 3 functions in php that works
Use backticks. http://php.net/manual/en/language.operators.execution.php
On Friday 14 September 2001 12:22, you wrote:
Hi,
I'm trying to unzip a file and save the unzipped data in a variable in PHP
using :
$result = system ( gzip -d -c myfile.gz ); /* 'gzip -d -c' unzips the
file to
Hello.. i speak spanish so.. i prefear the answer to this question will in
spanixh:
I have a problem... i do all correctily but.. iy happens.. a lot of times.. :
bash-2.04# cd apache_1.3.19
bash-2.04# ./configure --prefix=/www
Configuring for Apache, Version 1.3.19
+ using installation path
You need to install the flex libraries from www.gnu.org: you locate it :
http://www.gnu.org/software/flex/flex.html
Nael Mohammad
Neomar, Inc.
[EMAIL PROTECTED]
415-403-7300 x314 (Work)
415-793-0609 (Mobile)
When Wireless Means Business
CONFIDENTIALITY NOTICE: This e-mail may contain
I'm trying to use a list/menu field with multiple options allowed but I'm
only getting the very last selection.
Here's part of my code to build the list/menu field;
print (tdselect name=\x[rec_pd4]\ multiple size=\15\\n);
print ($option_pd4);
print ( /select/td\n);
Here's the code to
I've come across this problem enough that I want to find out if there's a
way to make it work, or if this is just a limitation of PHP. Here's what
I'm trying to do:
print split(=,$testString)[0];
This gives me a syntax error. I've also tried:
print (split(=,$testString))[0];
Along with
In PHP Version 4.0.3pl1
for ($i='01';$i=12;$i++)
the increment used to produce
01
02
03
...
09
10
11
12
but in
PHP Version 4.0.6
the identical script
for ($i='01';$i=12;$i++)
produces:
01
2
3
...
9
10
11
12
I want the week and month days to have leading zeros - how can I make the
new
I am using Apache with php version 4.0.4pl1. I am trying to display data in
a popup window. I want to pass there variables, one string and two normal
arrays.
Both the $name and $data variables contain valid data in the dispData
routine, however the $data2 array is always blank.
**
php doesn't have as loose a syntax as perl or python. try this:
?
$testString = this=is=something;
print array_shift(split(=,$testString));
?
mind you, that only works because you wanted the 0th element, and shift
returns that first one...something else would be needed for any other
index...
Hi
has anyone in the PHP world ever managed to run mysqlimport via exec?
I have written a one line script
mysqlimport -u user -ppassword table file.txt
chmodded it (+ x), which works from the command line every time.
I've tried exec(), system() etc within PHP but with no luck.
I have my own
From: Michael Gerholdt [EMAIL PROTECTED]
I want the week and month days to have leading zeros - how can I make the
new environment replicate the old?
Loop using the numeric but use printf for the formatting (which is really
what you should have used originally). Refer to the manual for the
I'm in the planning stages of a smallish app that will need to run some shell
commands that generally require root privileges to run (eg: route, ifconfig,
ifup). I know this is a security nightmare but I don't really have a choice,
I have to provide this functionality through a web based
JD isset checks to see if the $a variable has
JD been set, ie, if it exists. if($a) checks for
JD the truthood of $a, meaning, if it has a
JD non-zero, non-null/empty-string value, then
JD its true, else, false.
... and if it's not set at all it returns a
warning unless you use @ :(
--
Andrew
73 matches
Mail list logo