On Thursday 12 December 2002 09:22, BABA Yoshihiko wrote:
> Jason Wong wrote:
> > Not sure why you're escaping the single quote. It's unnecessary -- and I
> > suspect you mis-escaped $select as well. Any you can use this format,
> > which IMHO, is a lot easier on the eyes:
> >
> > $sql = "INSERT IN
you could try doing
$realfilename = realpath($fname);
if (strpos($realfilename, $the_valid_path_to_my_file_directory) !== 0)
{
// bad file name, like /etc/passwd
}
elseif (is_dir($realfilename))
{
// bad user looking at directory
}
On Thu, 12 Dec 2002, Dara Dowd wrote:
> Hello,
Hello,
I have a query string like this
http://server/download.php?fname=name_of_remote_file. The script runs and displays a
file download dialog box.
Is there a way of validating the querystring to ensure that a user doesn't try
something like fname=. or fname=.. or fname=? or fname=/, which ena
Hi
Try and get them (your hosting company)to configure your site with a
prepend file e.g. prepend.php for your domain.
in this file, do something like:
//
// DECLARE ARRAYS
//
$_GET = array( );
$_POST = array( );
$_SERVER = array( );
// etc..
while ( list( $sKey, $mVal ) = each( $HTTP_GET_V
I began to develop a small session based shopping cart using newer syntax.
For example, $_SERVER, $_REQUEST, $_SESSION, etc. Anyway, I'm almost done
with the cart and just found out that the hosting company for the client is
running PHP 4.0.6. Is there anyway around this besides changing all of m
Remove the {braces}, those are only used when
inside "a {$strin['g']}". Also, be sure to
'quote' your array indices.
unset($arr['foo'][$bar]);
Regards,
Philip Olson
On Wed, 11 Dec 2002, Richard Baskett wrote:
> Ok I feel a little sheepish after that answer :) Still not working though
> d
*sigh* n/m I just got rid of the curly braces and that did the trick.
Thanks!
Rick
"Science without religion is lame, religion without science is blind." -
Albert Einstein
> From: Richard Baskett <[EMAIL PROTECTED]>
> Date: Wed, 11 Dec 2002 18:50:20 -0800
> To: <[EMAIL PROTECTED]>, PHP General
Why don't you just use include?
$month = 12;
$year = 2002;
// This include has access to the above variables
include 'make_calendar.php3';
Include it wherever you intended to print $caledar_html.
It doesn't exist in your code because the url is seen as
part of the filename.
Regards,
Phil
Ok I feel a little sheepish after that answer :) Still not working though
due to my variable.. help!
unset({$_SESSION[map][mapText][$_POST[Email]]});
Im getting errors on this because I havent figured out how to get it to
understand that variable :(
Rick
"If I accept you as you are, I will mak
The error you get does not have to do with that note,
but rather that code of yours has many other issues
such as:
a) The syntax is incorrect
print "a b " c " d"; // bad
print "a b \" c \" d"; // good
print "a b ' c ' d"; // good
print 'a b " c " d'; // good
...
include("");
If you wish for this to be a correct PHP statement, it should be:
include("");
Otherwise it will error.
--
Kyle Gibson
admin(at)frozenonline.com
http://www.frozenonline.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> How can I delete a key and it's value from an array?
>
> for example:
>
> $test = array(0=>'yes', 2=>'no', 5=>'maybe', 7=>'so');
>
> And I wanted to delete the second key "2" so I could end up with an
array
> like so:
>
> $test = array(0=>'yes', 5=>'maybe', 7=>'so');
unset($test[2]);
---Joh
How can I delete a key and it's value from an array?
for example:
$test = array(0=>'yes', 2=>'no', 5=>'maybe', 7=>'so');
And I wanted to delete the second key "2" so I could end up with an array
like so:
$test = array(0=>'yes', 5=>'maybe', 7=>'so');
How would I go about doing that?
Thanks!
R
On Wed, 11 Dec 2002, Jay (PHP List) wrote:
> Okay, I need to retrieve the output of a php file with variables being
> passed to it. Example:
>
> $calendar_file = "make_calendar.php3?month=$month&year=$year";
> $fp = $fp = fopen("$calendar_file", "r");
Oh my! That's not going to work, because
"m
if you have URL wrappers enabled, do
$fp = fopen("http://path/to/your/file/$calendar_file";, 'r');
On Wed, 11 Dec 2002, Jay (PHP List) wrote:
> Okay, I need to retrieve the output of a php file with variables being
> passed to it. Example:
>
> $calendar_file = "make_calendar.php3?month=$month&
> Okay, I need to retrieve the output of a php file with variables being
> passed to it. Example:
>
> $calendar_file = "make_calendar.php3?month=$month&year=$year";
> $fp = $fp = fopen("$calendar_file", "r");
> while (!feof ($fp)) {
> $buffer = fgets($fp, 4096);
> $calendar_html .= $b
Hello List,
Is there a way to execute a cgi inside of php? This is what a customer wants to do:
include("");
but get an error message:
Parse error: parse error, unexpected '.' in
D:\Inetpub\townforum\wwwroot\orgs\header.php on line 3
The manual says it won't work:
http://www.php.net/manual/
Okay, I need to retrieve the output of a php file with variables being
passed to it. Example:
$calendar_file = "make_calendar.php3?month=$month&year=$year";
$fp = $fp = fopen("$calendar_file", "r");
while (!feof ($fp)) {
$buffer = fgets($fp, 4096);
$calendar_html .= $buffer;
}
fcl
Jason Wong wrote:
Not sure why you're escaping the single quote. It's unnecessary -- and I
suspect you mis-escaped $select as well. Any you can use this format, which
IMHO, is a lot easier on the eyes:
$sql = "INSERT INTO `guest`
SET `title` = '$title',
`fir
> I am working on a generic JavaScript form checked, that takes the
> names
> of the elements, with the first two letters being the type of element,
so
> its checks that it is right, if not gives a generic error message e.g.
YOu
> Need To Fill this in and selects it, or Sorry only numbers are a
> >It'd be easier to use a regular expression for something like this.
> >Something like this would work (from PHP Architect):
> >
> >$s = "I am going to be {a} years old on the {b}th of November, {c}.";
> >$a = array(
> >"a" => "one hundred",
> >"b" => "seventeen",
> >"c" => "two thousand two");
>
Well, except for the fact that the file name is wrong. I sort of figured
it out though.
Anyways, I appreciate the help and hope this wasn't too much useless
chatter from a relative Php newbie.
Colin
On Wednesday, December 11, 2002, at 06:36 PM, Philip Hallstrom wrote:
Then you're getting exac
Then you're getting exactly what you should be getting. fopen will read
the text file as it appears on *disk* not what the output on your browser
is.
??
-philip
On Wed, 11 Dec 2002, Colin Bossen wrote:
> I add mention that the contents of the download.php file are the
> contents of the fil
I add mention that the contents of the download.php file are the
contents of the file I am trying to download...
On Wednesday, December 11, 2002, at 06:31 PM, Colin Bossen wrote:
Opps... $data is set on the download page. It is set like this:
$path .= "export/".$name;
$fp = fopen($path, "rb
Opps... $data is set on the download page. It is set like this:
$path .= "export/".$name;
$fp = fopen($path, "rb");
$data = fread($fp, $size);
fclose($fp);
Colin
On Wednesday, December 11, 2002, at 06:21 PM, Philip Hallstrom wrote:
Where/How do you set $data? Everything else looks fine,
I haven't used headers for this, but heres my $0.02.
What is the value of hte $name var? I suspect its empty, as register_globals
is probaly enabled... try using $_GET['name'] instead of just $name, and
$_GET['size'] instead of $size.
Jason Reid
[EMAIL PROTECTED]
--
AC Host Canada
www.achost.ca
Where/How do you set $data? Everything else looks fine, but without
knowing that we can't help much.
On Wed, 11 Dec 2002, Colin Bossen wrote:
> Hello:
>
> I am trying to use the header function to enable users to download
> files. I am able to get files to download. Unfortunately, the wrong file
Hello:
I am trying to use the header function to enable users to download
files. I am able to get files to download. Unfortunately, the wrong file
keeps downloading. Instead of downloading the file I want the php source
file is getting downloaded. Here is the posting code:
$output = "Click her
Side note...the formatting for my email program went all weird. The numbers
I'm getting as error are as follows:
4.6E-009 * 10^6
1.7E-006
^ indicates that the next number is an exponent... The real error does not
show the ^ sign.
- Original Message -
From: "Stephen" <[EMAIL PROTECTED]>
T
Ok, nevermind about that. I fixed it finally. However, I am having trouble
with the negative exponents. I want to find the scientific notation of
0.0046 which should be 4.6 * 10 to the negative 3rd. However, what I get in
return is this:
4.6E-009 * 106
How could I fix this problem? I'm also havin
Have to be a bit more specific, cause I can't reproduce your
problem... Do you have some code examples that show it clearer?
name for client is "COMPANY #1" in DB
name;
echo "This is the name: $name";
?>
Output:
This is the name: COMPANY #1
A # sign is just another character in HTML, and all
At 12/9/2002 07:20 PM, you wrote:
It'd be easier to use a regular expression for something like this.
Something like this would work (from PHP Architect):
$s = "I am going to be {a} years old on the {b}th of November, {c}.";
$a = array(
"a" => "one hundred",
"b" => "seventeen",
"c" => "two thous
Why don't you just try:
$cust2 = str_replace('#','#',$cust);
That should replace all instances of # with it's html entity equivalent. If
that doesn¹t work then there is something else wrong with your script and
we'll need to see it all! :)
Rick
"People who drink to drown their sorrow should be
I'm looking for additional tutorials/examples for building an events
calendar service using JSRS (Javascript Remote Scripting) and PHP/MySQL.
But ideally I'd rather use a pre-made script if one exists. I have several
other projects that I need to complete and I'd rather not get side-tracked.
So if
I have a string I'm returning from a database. Some entries have # signs
in the names ie (COMPANY #42, COMPANY #43...). When I display results
all I have is COMPANY. Everything after the # is dropped off. I tried:
If ($cust) {
$cust2=ereg_replace('#','no',$cust);
//tried $cust2=ereg_replace("
"Jimmy Brake" <[EMAIL PROTECTED]> schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am looking for a good imap library ..
>
> That will let me:
>
> login
> logout
> list folders
> list contents of a folder
> retrieve email
> retrieve just headers
> retrieve the attachement of
Ok...I tried this code but...all it does is take up all my RAM and crash the
browser... I don't quite see what I'm doing wrong with it:
$i = 1;
$exp = 0;
do {
$num /= 10;
list($whole, $nothing) = explode(".", $num);
if(ereg('^[0-9.]+$', $whole))
{
$i = 2;
}
else
{
Hi!
I am looking for a good imap library ..
That will let me:
login
logout
list folders
list contents of a folder
retrieve email
retrieve just headers
retrieve the attachement of an email
get the number of messages in a mailbox
set server side filters
etc
I have been digging around sq
I may be wrong about this becuase I don't program JSP but if the values in
$_GET are strings then you may need to encase them in quotes.
var action = "";
-Kevin
- Original Message -
From: "Jeff Bluemel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 11, 2002 3:22
related to "Automatic include of files containing functions"
Can we capture errors for missing functions and have the script correct the
problem and attempt again?
For example//
$result=MyFunction($someVariable);
if this function doesn't exist, PHP generates an error. Capture the error
Here is what I am looking at for a partial solutions (see "redirect missing
function error" for my next hurdle)...
All functions are contained within individual files in a "functions" directory,
none of which are hard included into the PHP pages;
eg//
./functions/ShowThis.php
./fun
I cannot figure out where my problem is with the following script. I know
I've used this syntax successfuly in the past. when I take out the
variables, and just set link to something without using php then this works.
know when I click on the form that activated the button it does nothing.
funct
On Wednesday 11 December 2002 23:48, user wrote:
> Our /usr/local/etc/php.ini has 'upload_tmp_dir =
> /data/www/php_uploads/'. But uploaded files are actually stored in
> /var/tmp. Also seem they disappear from the server after being uploaded
> very quickly and we don't have a crontab job runnin
Yep, pretty close to what I needed. Had to do a bit of tweaking, but
basically was able to get the results I needed.
Thanks
- Original Message -
From: "Chris Hewitt" <[EMAIL PROTECTED]>
To: "Beauford.2002" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, December 11, 2002 5:1
Our /usr/local/etc/php.ini has 'upload_tmp_dir =
/data/www/php_uploads/'. But uploaded files are actually stored in
/var/tmp. Also seem they disappear from the server after being uploaded
very quickly and we don't have a crontab job running to clean them up
from time to time automatically. I n
Add 0
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
"Beauford.2002" <[EMAIL PROTECTED]> wrote in message
001b01c2a1af$b9995e20$6401a8c0@p1">news:001b01c2a1af$b9995e20$6401a8c0@p1...
> Hi,
>
> Not sure if this is a PHP of a MySQL question, so I am sending it to both
> g
Tony Earnshaw wrote:
ons, 2002-12-11 kl. 22:29 skrev Jonathan Ellis:
horde -- main point in its favor is it is quite actively developped,
and has an active community (mailing list has rougly 10x activity of the
others here), but the docs are pathetic.
The docs are the PHP4 and PEAR manuals. T
ons, 2002-12-11 kl. 22:29 skrev Jonathan Ellis:
> horde -- main point in its favor is it is quite actively developped,
> and has an active community (mailing list has rougly 10x activity of the
> others here), but the docs are pathetic.
The docs are the PHP4 and PEAR manuals. Those who can not b
Does anyone know if there is a workable method currently for writing IPTC tags
to JPG & TIFF files using PHP 4.2.3 specifically with the intent to read these
written tags with photoshop 6.0 and later??
Currently we can set and read tags in PHP, but photoshop only sees any tags that
it origin
Thanks Jason...that werked fine for me..
--pS
On Wednesday, December 11, 2002, at 03:50 PM, Jason Wong wrote:
On Thursday 12 December 2002 04:30, Pushpinder Singh Garcha wrote:
Hello,
I am using PHP to create forms and then am entering the user input
into
a MySQL DB
In the first query I am
On Wed, 11 Dec 2002, Juan Rosero wrote:
JR>>> Whenever PHP 4.3.0 is released will it officially support Apache 2?
I wasn't aware Apache 2 officially supported a working mpm yet?
--
With kind regards,
Melvyn Sopacua
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: ht
> > >I have a question. How would you move the decimal left or right,
> > depending on if the
> > >number a user enters is negative or not, and then move it that many
> > spaces? If
> > >needed, it would add zeros.
> >
> > Hmm. Trying to remember what grade I learned this in. You multiply by 10
> >
On Wednesday, Dec 11, 2002, at 13:36 US/Pacific, Antti wrote:
Thanks it works.
I forgot to say that i need to add a new line to that file. Now it
puts all the stuff at the same line. How do I make it to add lines?
Use fputs with the string ending with a \n, as in:
$xmlfp = fopen($theX
Sean Burlington wrote:
Antti wrote:
How can I add lines to a text file? I didn't find any function for this.
Thanks, antti.
just open it in the right mode
if you just need to add to the end of the file without doing anything
else with it first
$fp = fopen ("/home/rasmus/file.txt", "a");
Whenever PHP 4.3.0 is released will it officially support Apache 2?
Thank you,
Juan
"Andrei Zmievski" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> PHP 4.3.0RC3 is out. Please download it from http://qa.php.net/ and
> test. This is the last release candidate
I recently checked up on just about every PHP application framework I
could find. I thought I'd throw my conclusions out for anyone else who
was looking for something similar.
What I was looking for:
Not a whole lot, really. basics like user management (including admin
controls for deleting, ban
Lumpkin, Buddy wrote:
Is php under apache 2.0 still experimental?
There has not been any announcement here, so I believe so.
What are the pros/cons?
Production 1.3.x. Development or play 1.3 or 2.0
HTH
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
Larry Brown wrote:
Does PHP have any commands to set the size of the window to be loaded? For
that matter are there any methods for hiding buttons etc. from PHP?
Being server-side it can only output html. You can open a new window but
not set its parameters. To do that you need JavaScript, wh
To use the bundled gd just do: --enable-gd
Note that 4.3.0 is the first distro that includes a
bundled GD. Also note that as of 4.3.0 just doing
--with-gd will also use the bundled GD. Before this,
--with-gd (no directory specified) would look for a
local copy. That seems odd yes but theor
On Thursday 12 December 2002 04:09, Larry Brown wrote:
> Does PHP have any commands to set the size of the window to be loaded? For
> that matter are there any methods for hiding buttons etc. from PHP?
All php does is output text, which is usually in the form of HTML. So do
whatever you need to
PHP 4.3.0RC3 is out. Please download it from http://qa.php.net/ and
test. This is the last release candidate before 4.3.0 final is
unleashed.
-Andrei http://www.gravitonic.com/
* The future is not what it used to be. *
--
PHP General Mailing List (http://www
On Thursday 12 December 2002 04:13, Steve Vernon wrote:
> Hiya,
> I am working on a generic JavaScript form checked, that takes the names
> of the elements, with the first two letters being the type of element, so
> its checks that it is right, if not gives a generic error message e.g. YOu
> Ne
On Thursday 12 December 2002 04:30, Pushpinder Singh Garcha wrote:
> Hello,
>
> I am using PHP to create forms and then am entering the user input into
> a MySQL DB
> In the first query I am trying to select the values that the user
> entered on the form
>
> THIS DOES NOT WERK gives error unab
Antti wrote:
How can I add lines to a text file? I didn't find any function for this.
Thanks, antti.
just open it in the right mode
if you just need to add to the end of the file without doing anything
else with it first
$fp = fopen ("/home/rasmus/file.txt", "a");
'a' - Open for writing
Numerous syntax errors produce your invalid query...
1) If you use double quotes to enclose the string, "INSERT..., then you do
not have to delimit your single quotes.
2) You accidently delimit a variable at VALUES ('\$select
3) The SQL command its self does not need to end with a semi-colon.
Fix
I had a little trouble with my cable modem before, but the Free MySQL
Hosting is back up if any of you are interested. =)
http://mysql.nukedweb.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
"Chris Wesley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wed, 11 Dec 2002, Stephen wrote:
>
> > One other question. How would I find the first 0 of a repeating zero.
> > Like 204,000. How would you find the 0 in the 4th column.
>
> For your repeating zeo
How can I add lines to a text file? I didn't find any function for this.
Thanks, antti.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
My guess is you don't have register_globals on. Replace each variable with
$_POST['field_name'] or $_GET['field_name'] depending on what your form's
method is. You could also turn register_globals on but that is a security
risk I've heard.
- Original Message -
From: "Pushpinder Singh Garc
Hello,
I am using PHP to create forms and then am entering the user input into
a MySQL DB
In the first query I am trying to select the values that the user
entered on the form
THIS DOES NOT WERK gives error unable to execute query
$sql = "INSERT INTO `guest` (`title`, `first_name`, `las
> >I have a question. How would you move the decimal left or right,
> depending on if the
> >number a user enters is negative or not, and then move it that many
> spaces? If
> >needed, it would add zeros.
>
> Hmm. Trying to remember what grade I learned this in. You multiply by 10
> to move it righ
I have made those changes, thank you (I even read the integers required
thing but for some reason didn't register it).
Here is what I have now. Working with Dec 25, 2002 (a difference that
should be 14 days).
difference in days:
AND IT WORKS
Thank you Chris you have saved, my hairlin
We're trying to use imap_open to access a pop3 server which is using port 120 instead
of 110. We know the port and pop3 server are working because we can access it from
Outlook.
$pop_inbox = imap_open("{".$mailserver."/$mailbox_type:$port}",$login,$password);
The code worked fine with port 110
Hiya,
I am working on a generic JavaScript form checked, that takes the names
of the elements, with the first two letters being the type of element, so
its checks that it is right, if not gives a generic error message e.g. YOu
Need To Fill this in and selects it, or Sorry only numbers are allow
Does PHP have any commands to set the size of the window to be loaded? For
that matter are there any methods for hiding buttons etc. from PHP?
Larry S. Brown MCSE
Dimension Networks, Inc.
(727) 723-8388
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.n
mark wrote:
preg_match_all("|(.*)|U",$content, $body, PREG_PATTERN_ORDER);
the example text im trying to grab is below - Anyone got any ideas, Ive
tried pattern modifying with /m but I cant implement it.
Please help
Thanks
Mark
you need pattern modifier s (PCRE_DOTALL)
this makes . match all
Hi All,
Haven't build apache and php for a while now and im just wondering if I should build
apache 2.0 or 1.3?
Is php under apache 2.0 still experimental?
What are the pros/cons?
Thanks in advance,
--Buddy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.p
Oh, and $today['wday'] ... that's the day of the week. I'm almost
positive you want the day of the month: $today['mday'].
hth,
~Chris
On Wed, 11 Dec 2002, Chris Wesley wrote:
> On Wed, 11 Dec 2002, Curtis Gordon wrote:
>
> > future date:
> >
> > current date:
> >
> > > (0,0,0
On Wed, 11 Dec 2002, Curtis Gordon wrote:
> future date:
>
> current date:
>
> (0,0,0,$today['month'],$today['wday'],$today['year']);?>
$today['month'] is text, ie. "December", and mktime() requires all
integer arguments. If you use $today['mon'] instead, it seems like
you'll get what you wa
yes you are right, im very pensive today, :)
thanks chris and mako
"Chris Wesley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wed, 11 Dec 2002, Mekrand wrote:
>
> > i solved problem, -not a good solution-
> > i changed only
> > $adam=fread($ip,filesize($ip
For any of you interested, I've created a set of scripts that let you run
your own PHP Scripts Directory, like the /PHP/Scripts_and_Programs/
directory of HotScripts for example. I originally made this for my own
site, but I decided to release it to the public instead =) It has all the
usual fe
Don't forget that people are very good at coming up with easy to read
displays that a computer will have trouble processing. I'll include a
lightly sanitized (so I don't get in trouble at work) example below:
- - - - -
W d y f m S
h 0 o s e
[EMAIL PROTECTED] wrote:
Hello list,
simple question:
I´ve heard that it is possible to compile php with dg-support on two ways
1) first way: Distribution dependant with the gd-files and libraries, eg. gd.c, gd.lo, gd.o
coming with the distribution of the compiled php-4.x-tarball
compiled the f
Hi List,
I compiled php-4.2.3 on my RH7.3 box that way
./compile ... --with-gd=/usr ...
gd and gd-devel are from RH7.3 base installation
I get the following error whil running -> make
:
In file included from gd.c:83:
gd_ctx.c: In function `_php_image_output_ctx':
gd_ctx.c:70: structure has no
I know I have to use pattern modifiers, but thats what Im saying its spewing
errors when I try to implement it.
I have been trying to fix it, but Im just lost.
"Bahwi" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Over here will help:
> http://www.php.net/m
Over here will help:
http://www.php.net/manual/en/ref.pcre.php
http://www.php.net/manual/en/pcre.pattern.modifiers.php
(From the second page:
/m/ (PCRE_MULTILINE)
By default, PCRE treats the subject string as consisting of a single
"line" of characters (even if it actually contains several
To your first question, I'm sure it can only increase efficiency.
To the second, think the other way around possibly...
Within your script, do the following (or something along these lines):
Pull a list of your includes directory into an array ($all_functions in my
example)
/**
$file is the scrip
On Wed, 11 Dec 2002, Mekrand wrote:
> i solved problem, -not a good solution-
> i changed only
> $adam=fread($ip,filesize($ip));
You have:
$string = fread( $fileHandle, filesize( $fileHandle ) );
The example at php.net you looked at has:
$string = fread( $fileHandle, filesize( $fileName ) );
Ju
Im trying to grab some info from a file, usual way (fopen,fread,flose then
regex), I need to get to separate bits of data, first one is a title works
fine because its the tag and it all on one line, but the second is
returning a null array, I think it may have something to do with the content
bein
>John, PHP-general,
>
>OK. I think I understand this, but let me ask just to be sure.
>
>So if I setup in my page something to this effect:
>if ($_SERVER['!HTTPS']) {
> echo "Switching over to SSL...";
> echo "";
yuck
recommend insuring this is at the top of your page and using header
i solved problem, -not a good solution-
i changed only
$adam=fread($ip,filesize($ip));
to
$adam=fread($ip,1024);
i dont understand what is wrong with filesize($ip) . i got this from php.net
and i thought it was valid.
link:
http://www.php.net/manual/en/function.fread.php
quote:
--
PHP Ge
On Wednesday 11 December 2002 19:19, Ronald Clark wrote:
Hi Ronald, hi List,
it isn't
> if ($_SERVER['!HTTPS']) {
but
if (!isset($_SERVER['HTTPS']) {
// unsecure
} else {
//secure
}
You want to check wether the server variable HTTPS is set or not.
johannes
--
PHP General Mailing List (h
> OK. I think I understand this, but let me ask just to be sure.
>
> So if I setup in my page something to this effect:
> if ($_SERVER['!HTTPS']) {
> echo "Switching over to SSL...";
> echo "";
> } else {
> echo "**Rest of Page**";
> }
>
> Would this work? I am about to add a secind site to my site
>but it doesnt work,
You sure? It should be that you were trying to get the
sizeof() $adam, which was thus far 0 bytes. So, of
course, it would return 0 bytes to $adam, and your
strstr() of looking for the IP address wouldn't work,
since $adam would contain nothing. Try print()ing
$adam to see wha
sorry the code was
that doesnt work.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
thanks,
it was very silly mistake,
but it doesnt work,
there in nothing wrong with if statement,
moreover,
i think there is something wrong with fread, is there another way to reading
a file, and return it as a string?
doesnt work too
--
PHP General Mailing List (http://www.php.net/)
To unsub
John, PHP-general,
OK. I think I understand this, but let me ask just to be sure.
So if I setup in my page something to this effect:
if ($_SERVER['!HTTPS']) {
echo "Switching over to SSL...";
echo "";
} else {
echo "**Rest of Page**";
}
Would this work? I
HI! I have two dates, one in the future, and the current date, I want to
calculate the difference between the two in # of days. I have converted
both dates to seconds:
future date:
current date:
Then I found the difference between the two:
Now I want to convert the difference to "days":
(
I did email the company that the csv feed is coming from so we'll see what
comes of that. I really hope they fix it.
Well here is what I did to solve the problem:
I pulled the csv file in using file(), then found the string length, used
substr() to get rid of the first double quote in the line a
Long time in coming, but thanks to all that have
helped with my stremaing audio and $_array questions.
I've figured out my problems thanks to all your help!
__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo
1 - 100 of 197 matches
Mail list logo