Is there a way of finding if a table exists with only
one command in MySQL? I've looked through the MySQL
functions, and the closest I've gotten to what I need
is mysql_list_tables or mysql_tablename (I'll have to
check into these a little more), but I was hopefully
looking for something that
I just JUST installed PHP onto a new server (my
first--kinda scary, new foray) and my pre-defined
constants (HTTP_SERVER, SCRIPT_NAME, etc.) aren't
being set. Any ideas? What switch do I have to flick?
__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful.
Anybody have any bright ideas?
Trying to install my own PHP on my own server. I'm
getting the error Redirection limit for this URL
exceeded. Unable to load the requested page.
I'm using Apache 2 and php 4.2.3 and haven't loaded
any extensions in PHP (yet).
I've got a URL like this:
http://www.naturalist.com/~fungae/index.php
which is stored in $http_referer (as parse_url from
$HTTP_REFERER).
I'm trying to extract the username (~fungae). I've
read the docs on parse_url(), and have tried to get
$http_referer[user], but it comes up with zilch. I've
I have an array I set up like this:
$monthschedule = array(1 = Jan, 2 = Feb, 3 =
Mar, 6 = Jun);
When I try to access them, doing this:
$r = $monthschedule[6];
nothing comes up ($r is blank). Any thoughts? There
are missing elements (4,5,7-12) in $monthschedule.
Your problem is with this line:
$adam=fread($ip,filesize($adam));
Remember that $adam is not a file pointer, but text
read from a file. The file pointer is $ip, so the line
should read:
$adam=fread($ip,filesize($ip));
(and should probably be contained within an if
statement for error
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.
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
I'm trying to find some documentation on the $_FILES
array, but on PHP, it's a little confusing. I read the
documentation and the comment from rep_spam@..., but
that wasn't too clear to me either.
I'm aware that when uploading a file named
$uploadedfile, the size, name, etc. get stored in
If I want to access an array of something from a form,
is it true that I just have to use
$_POST[array[$counter]? So I can legitimately do a
count() of this array, like count($_POST[array])?
__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable.
(Thanks to all who've replied about the streaming
audio. Haven't had a chance to respond or anything
yet.)
Here is a problem I'm having similar to somethnig
someone just posted, but not quite the same. I'm not
too experienced with the intricacies and
complications of arrays, but I have a
Wow. This goes way beyond simply printing
multidimensional arrays. Here's some sample data:
$issue[][number] = number;
$issue[][headline] = headling;
$issue[][writers] = writers;
$issue[][list] = list;
$issue[][senttosubscribers] = 0;
$issue[][month] = 05;
$issue[][year] = 2003;
Thanks to Paul and Marek for some ksort() advice. I'll
try that out as soon as I can count() these buggers.
A little more info on my count()ing.
I have $issue[0][number] to $issue[x][number] just
like any other multidimensional array (we'll call them
m-arrays for simplicity).
If I try to
if [$number] is unique, use it as the key:
Yeah, I'd thought of that except there's no guarantee
that it will be unique.
Plus, it makes it harder to go through with a simple
loop because $number really isn't guaranteed to be
numeric (okay, so I have to change the name). Plus, it
may not even
Does anyone know how to do streaming audio with PHP?
No clue if this is even possible. I've checked around
a bit, looked at some script sites, but nothing seems
to give a clue. I *think* it might be possible to set
something like this up, but I'm not sure.
Finally, I found y answer to my ereg/grep question.
Thanks to all those who took a stab at it. You led me
to the answer. For all those interested in reg-parsing
comma-delimited lists, here is what I searched for:
'^INPUT TYPE = \HIDDEN\ NAME = \numbers\ VALUE =
\[0-9,\]*[\,] . $numbertosearch .
I don't think a simple sort() will do this. Is there a
way I can sort these following array values so that
all will be in numerical order, and then alphabetical
after that?
I need
Dirfiles/97
Dirfiles/98
Dirfiles/99
Dirfiles/100
Dirfiles/101
Dirfiles/102
Dirfiles/ABG1
Dirfiles/ABG2
in that
Sorry to repost this, but I haven't found a solution
and it's still nagging me. Maybe some of you can come
up with something I can't. Here was my original post:
I've made myself an INPUT TYPE=HIDDEN tag that
contains in the value attribute a list of
comma-delimited numbers. I need to find if a
first way:
if(ereg('([^0-9]|^)'.$your_number.'([^0-9]|$)',$_REQUEST['numbers'])
) second way:
$numbers=explode(',',$_REQUEST['numbers']);
if(in_array($your_number,$numbers))
Not sure I get this but, again, I can't use $_REQUEST
or explode or in_array at this point. The entire
process needs to
this is probably not at all what you want, but i
wrote it just in case.
.
.
.
if 1 is in the string it will return either
middle, left, right or only.. if it is not it
will return false.
The problem with this is that I need to do it at the
Linux level, or else I'm not saving PHP the trouble of
Why do you need 1.5?
Isn't that the one with GIF support on it?
__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I have a real problem that I can't seem to figure out.
I need an ereg pattern to search for a certain string
(below). All this is being shelled to a Unix grep
command because I'm looking this up in very many
files.
I've made myself a INPUT TYPE=HIDDEN tag that
contains in the value attribute a
If the OP was concerned about such issues then
he/she should not be using GIF at all!
This is leading me to believe that I can't use GIFs
because of these issues. Is this true? I know now that
Unisys (Unisys?) made a fuss about some compression or
whatever, but someone told me it was still okay
Email extension? Aren't you talking about Manuel
Lemos' mimemail class?
It's just an include file that you have in your
directory structure.
I know some people made reference to a 'really good'
e-mail package out there that did attachments and
stuff that seemed to be the better choice
Is there a list of PHP extensions out there somewhere,
and what the function of each one is? And does anyone
have the URL of that e-mail extension everyone finds
so useful?
__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
Does anybody know where to find GD 1.5? Every link I
seem to find is dead.
__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I've tried doing a search for this problem on the web, but haven't found anything, nor
have I found any solution on the php.net documentation.
Does anyone know if it's possible to do a file search with a wildcard character? I
need to find if there are any HTML files in a certain directory,
$a = explode (' ', shell_exec (ls $foldername/*.html));
Didn't know of shell_exec() until now. It works, though. Thanks!
Is there any reason why it wouldn't work? If I changed servers, say, and there were
some ports blocked and etc. etc., is there a risk that I should know?
Well, as a general rule, it won't work if you're not
using a UNIX o/s orif PHP has been set up with safe
mode on, or if you don't have the rightpermission to
see that folder. That's probably a non-inclusive list,
butthere should be ways around each of these problems
(depending on thedegree of
If you're only executing one-liners and get all the
results back you're
better off using shell_exec(). popen() lets you open
a pipe to a
command--that way, you can funnel data to it as if
you were typing from the keyboard.
That's what I'll do then: use shell_exec().
Permissions would be
30 matches
Mail list logo