Hi Chris,
Thanks for the pointer :) I found some other interesting reference and ideas
on using this in the manual. Now I just need to provide some error checking
in case $_GET['menu'] isn't defined in the URL (that should be pretty
straight fwd) and in case it is defined, but a corresponding
Hi :)
I want to place a particular image on a page based on the URL of the page. I
have a variety of standard patterns to match in the URL. For instance;
I would want all the following pages to load an image named something like
foo_2.jpg
mod.php?mod=userpagemenu=2page_id=xxx
At 21:55 13-3-2003, you wrote:
mod.php?mod=userpagemenu=215page_id=xxx
mod.php?mod=userpagemenu=20001page_id=xxx
mod.php?mod=site_mapmenu=20010
And would want all the following pages to load an image named something like
foo_1.jgp
mod.php?mod=userpagemenu=1page_id=xxx
submit.phpmenu=100
Hey all, I'm coming over from programming ASP in VBScript and I know that a
wildcard there is '%' can anyone tell me what it is in PHP? Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Wildcard for what?
Please be more specific ... do you mean database queries ... regular
expressions ... what?
Thanks.
-Original Message-
From: vernon [mailto:vernon;comp-wiz.com]
Sent: 15 November 2002 15:32
To: [EMAIL PROTECTED]
Subject: [PHP] php Wildcard???
Hey all, I'm coming
You mean the opening tag ?
For php use ?php {code here} ?
regards,
Ewout de Boer
- Original Message -
From: vernon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 15, 2002 4:32 PM
Subject: [PHP] php Wildcard???
Hey all, I'm coming over from programming ASP
I'm trying to make a small and simple search function, but it only works for
exact searches, and I can't figure out how to make a wildcard search, if I
do it in the php or in the mysql_query, can't really find anything about it
and I don't know what to look for on php.net
Håkan
--
PHP General
That's because this is a MySQL-specific question and you should be reading
the MySQL documentation or asking on the MySQL list.
-Rasmus
On Mon, 11 Nov 2002, Håkan wrote:
I'm trying to make a small and simple search function, but it only works for
exact searches, and I can't figure out how to
in MySQL to create a better
search feature.
---John Holmes...
-Original Message-
From: Håkan [mailto:hw2k;barrysworld.com]
Sent: Monday, November 11, 2002 4:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] wildcard search?
I'm trying to make a small and simple search function, but it only
RTFM...
http://www.mysql.com/doc/en/Pattern_matching.html
Håkan wrote:
I'm trying to make a small and simple search function, but it only works for
exact searches, and I can't figure out how to make a wildcard search, if I
do it in the php or in the mysql_query, can't really find anything about
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,
How about:
$a = explode (' ', shell_exec (ls $foldername/*.html));
This should return an array that contains the name of all the *.html
files in the folder $foldername, if any.
Hope this helps.
Cheers,
Marco
-
php|architect -- The Monthly Magazine For PHP Professionals
Come
-Original Message-
From: Mako Shark [mailto:phpman2000;yahoo.com]
do I have to do a
readdir() and read the filename of every file until I find an
HTML or until all files have been read.
This is what the shell expression supplied by Marco Tabini actually does;
doing it in PHP
$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 or
if PHP has been set up with safe mode on, or if you don't have the right
permission to see that folder. That's probably a non-inclusive list, but
there should be ways around each of these problems (depending on the
degree of
Mako Shark wrote...
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?
My understanding is that many security-conscious
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.
Permissions would be a problem with readdir() as well.
Marco
--
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
Hi all.
Im trying to figure out how to do a search trough a MySQL db using LIKE
or = but the thing is that I have 3 select boxes from where to choose
the search terms. Can I use something like a wildcard instead of making
several IF statements like this?
SELECT * FROM table_name WHERE col1 =
Cesar,
Yes, its:
select * from table_name where col1 like '%' and col2 like '%' and col3
like '%';
As your default is %, then this is easy.
Its all in the mysql manual, Section 6.3.2.1 String Comparison Functions.
HTH
Chris
César Aracena wrote:
Hi all.
I'm trying to figure out how to do a
Sorry, I couldn't think of a well-worded, descriptive title for what I'm
trying to do.
As I believe I mentioned before, I use PHP and MySQL to keep a journal.
all the entries are accessed by /index.phtml?id=23 , where 23 is
replaced by the id of the entry you want.
A problem I'm having is that
As I believe I mentioned before, I use PHP and MySQL to keep a journal.
all the entries are accessed by /index.phtml?id=23 , where 23 is
replaced by the id of the entry you want.
A problem I'm having is that some search engines' spiders (google, most
notably), won't navigate through all the
23 matches
Mail list logo