Not sure if you've looked at it already or not, but www.webmonkey.com has
great web programming info. I followed a couple php tutorials from there &
was up & running... then again I've done alot of programming prior to PHP so
maybe I'm just warped.
Patrick
- Original Message -
From: "Bea
I'm currently having a problem with another array in a class & I can't
figure it out -
class myClass
{
function myClass($arr = array( 'item1'=>array('a','b','c'),
'item2'=>array('a','b','c') ) )
{
print_r( $arr );
while( list($key,$val) = each($arr) )
{
I have a class that reads gif images & can then make jpeg or png thumbnails
of the gif image, but it only seems to work on linux. Is there any way to
open/convert the gif to some other graphic format so I can at least read the
gif image in on windows?
here's the current code I have for reading in
Ok, considering GIF support was dropped in the latest & greatest... How
come on my linux webserver I can get imagecreatefromgif(() to work, but not
on my windows test server? The seemingly strange thing is that
imagecreatefromgif() seems to be the only gif function that works on the
linux server
quot;2", [2]=>"3", ) }
For some reason the first while() does not print anything, but comment the
first while() & let the 2nd run & it prints. What's up with this? Is this
correct or am I missing something obvious again?
Thanks again
Patrick
- Original Message --
I'm having problems figuring this out. This first way gives me a 'Fatal
Error: Cannot use [] for reading in class.php on line xx'
class myClass
{
var $arr = array();
function add_something( $value )
{
$this->$arr[] = $value; // this is the line causing the error
}
}
I've
What's the difference in performance between
print( file_get_contents("myfile.html") );
and
include("myfile.html");
is there any particular reason for using one over the other?
Patrick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 01, 2003 1:42 AM
Subject: Re: [PHP] IMAP error while compiling PHP-4.3.0
> On Saturday 01 March 2003 06:30, Patrick Teague wrote:
> > I'm trying to co
I'm trying to compile php on Mandrake 9, but this latest error during
compile has me stumped as I've installed all the imap-devel type rpms.
.
checking for IMAP support... yes
checking for pam_start in -lpam... yes
checking for crypt in -lcrypt... (cached) yes
configure: error: Cannot find ima
> Have a problem in reading a text file and displaying it in a text box
> area,also what function should i used to overwrite an existing text file.
For type text boxes, use the following -
$var
Please note that if you include *any* kind of spaces or tabs or other
characters between the textare
I know I've seen something about this (I can't remember whether yea or nay),
but I can't remember where I found it as at the time I was looking for
something else... and now that I'm looking for it I can't find it again.
Anyways, what I've done is store variable names that end up being passed as
p
> Anyone has a good example to build a system that show X records per page
and
> give links to next and previous pages?
I know MySQL has a 'LIMIT x, y' you can tack onto the end of a query (I'm
guessing this goes the same for any other SQL db?). From how I've seen this
work, 'x' is the start numb
I found info on php.net about how to set content type for a file & then
cause it to be a downloaded file. So far it's been working for showing
everything until I tried having it display a jpeg. Here's the code I have -
header("Content-type: ".$atype);
readfile(include($afile));
The only problem
I ran into something interesting & the only thing I can figure out is that
functions won't use any variables other than globals, those past to the
function, or those created inside the function?
here's what I had that didn't print anything other than 3 blank lines for
this section of code -
$byte
quot;Win98" through the above eregi_replace I end up with "Windows 8".
Same problem with any of the other strings.
What's my problem??
Patrick Teague
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
Considering all of this... Would it be better simply to turn
register_globals = On if the vast majority of the stuff you have on your
site is simple search engine type stuff and/or GET variables?
Considering the fact that anyone can forge GET, POST, & cookies, is there
really any purpose
> *ANY* time you can sort/search in SQL, or you can do it in PHP, the SQL
way
> will be faster.
< and >
> Grouping and sorting is something databases specialize in.
Any suggestions on how to do this? Currently I have a table with Headers &
another table with Pages... Should I create yet anot
Hey,
I ended up looking at using eregi to pull this information out of the
original HTTP_USER_AGENT as this is more accurate than the extra info from
browscap.ini. You have to list out all of the browsers & OSs. However, I'm
having problems detecting the Amaya browser...
$browser_string = gete
n Tue, Jul 02, 2002 at 05:26:45AM -0500, Patrick Teague wrote:
> >
> > $eregi_str = "(\; |\()Win[ \.a-z0-9]*(\)|\;)";
>
> $eregi_str = "(Windows|Win[^d])[^;]+";
>
> > if( eregi( $eregi_str, $browser_string, $arrstring ) )
> > {
> >
Hey,
I'm wondering if anyone has found or ended up writing something similar to
the MSWC AdRotator object in ASP, but for PHP? Or is there already a module
on apache.org that I missed?
Thanks for any help :)
Patrick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: h
Hey,
I'm working on a way to pull menus/pages from a database. Currently I have
this working on 2 levels - Topic headers & actual page titles - & it prints
it out fairly nice & doesn't take long to load. What I need to do is add a
level between the 2, a sub-header.
I'm running both the apache
Ack!
Ok, Ereg/Eregi returns the first matching string. How do I find any other
matching strings? Or is there a better way of doing this?
$eregi_str = "(\; |\()Win[ \.a-z0-9]*(\)|\;)";
if( eregi( $eregi_str, $browser_string, $arrstring ) )
{
$browser_os = $arrstring[0];
}
This works fin
ng
several functions using eregi to find stuff... with no success. Then again
I am pretty pathetic in using ereg/eregi to find more than a couple
characters.
Thanks for your help guys :)
Patrick
- Original Message -
From: "Chris Garaffa" <[EMAIL PROTECTED]>
To: "Erik
> I check for the occurrence of the search string
> if($pos=strpos ($line, $strfrom))
I hope this isn't exactly the way it is in your code. It should be 2 "="s.
> if($pos==strpos ($line, $strfrom))
otherwise with only 1 = you assign the right hand value to the left hand
variable even within the
Hey,
Currently I'm trying to set up a system on the website to detect the OS &
the browser type & version of incoming traffic. Is there an easier way to
do this than trying to parse the HTTP_USER_AGENT variable? I'm coming from
an ASP/VBScript background & these were specific variables as part
I'm receiving "Parse error: parse error, expecting
`T_CONSTANT_ENCAPSED_STRING' in /host/plugged/index.php on line 3" error
when trying to require_once a couple of files.
top of index.php looks like so (line 3 is where I use $homeDir .
"/common/header.php")
contents of homedir.php is
As you c
I'm having problems with .htaccess files setting up the php_value
include_dir on both my development & test servers. I'm using php4 under
apache on win2k for development & php4 under apache on unix as a test
server. I've currently done the following on the win server
php_value include_dir
ok, so this makes alot of since... if I move my website from one server to
another server I'll have to go through every single file & redo the
directory structure? Isn't this the reason for the includes... so you
don't have to go through every single file to make changes? Maybe I should
go bac
28 matches
Mail list logo