t that leaves you
outside php mode, right? If the next thing after eval()
is more php code, don't you have to enter php mode
again like this:
eval("?>$string zzz';
eval("?>$string);
echo "hello";
is equivalent to:
val()'d code on line 1
Do I have to use < and > in place of "<" & ">"? I tried
several combinations, but I still get the same error.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of
ring = preg_replace("/\[(.*?\.)(gif|jpg),(.*?)\]/i", " alt=\"\\3\">", $string);
>
> echo $string;
>
> ?>
Great!. I love it when I see stuff like this written by someone
who knows regex better than I. The ability to insert the
pieces that ar
h HTML code
Succinctly stated.
>space+bird.gif"this is a bird"
This is a possibility, but it requires a bit trickier code to
recognize & split it. I was hoping for something easier
to identify and parse, so maybe:
#bird.gif|some text#
That should be easy
machine do all of the dirty work, not just in looking up
the image size, but also formatting the output.
For example, I'm already using functions like:
emitlink("http://www.microsoft.com","Microsoft";);
so I will have a similar function:
emit
"John A. Grant" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
[...]
> How do I distinguish between false and "$xxx parameter not
> passed"? Do I use isset()? Do I use ===?
Well, I guess I should have done some home
=false;
$xxx=null;
$xxx="";
How do I distinguish between false and "$xxx parameter not
passed"? Do I use isset()? Do I use ===?
Thanks.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ott
uffixes and 'special page
names.
Perhaps it is only sufficient to test for $PHP_SELF and not $argc,
but I threw in $argc==0 anyway.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please
ter="\r\n";
}else{
$delimiter="\n";
}
and then my code looks like:
print "hello$delimiter";
How can I do this?
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If
.php. Then I
run a batch editor on them to replace links to *.php with
links to corresponding *.html files.
Thanks.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a c
"John A. Grant" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've installed ActivePerl, which gives me a way to run .pl files,
> i.e. :
> c:\> perl someprogram.pl
>
> Does the Win32 php installation
e) ...
if(x==false) ...
itt's always considered better to do this:
if(x) ...
if(!x) ...
But PHP seems to require a direct comparison with false
in certain situations. Are there any cases where you need
to do a direct comparison with true?
Are
;t that be:
function top($image=null)
if ($image)
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here
--
PHP Genera
ory.hts/tech/735399
Solution:
http://www.builder.com/Authoring/Tagmania/011000/index.html
The latter solution is very good because it covers all of the bases.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ot
web server? I started to install it, but it looked
like it was going to just install server stuff, so I cancelled it.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail
nding *.html pages in batch
mode as follows:
c:\> php index.php > index.html
c:\> php about.php > about.html
etc.
and then run a batch search/replace program on the
*.html files to change all links to .php pages to link
to the newly-generated pages.
rays, so you have to mark the end with \0.
php arrays have a length attribute, so \0 terminator is
unnecessary.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me
ps img(filename,text)
is more elegant, but it might need more skills than I have in using
regex to recognize it and extract it. Also I need to figure out how
to extract and echo the plain text around it.
Any ideas are appreciated. Thanks.
--
John A. Grant * I speak only for myself * (remo
ot;\S",$buffer) to check for a blank
or must I use preg_grep()or that. What specific things require
preg_grep() to be used instead of ereg()?
Thanks.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If yo
at's killing you, not something
> else.
I realized it was insignificant amount of memory, but I
wasn't sure about whether this was ok or not in a server
environment. I will use file() and investigate further if it
seems slow. Thanks.
--
John A. Grant * I speak o
In Perl I have done this:
$julianday=(localtime)[7];
Is there an equivalent syntax for PHP or do I just do:
$now=localtime();
$julianday=$now[7];
I don't need it - I'm just curious about the syntax.
--
John A. Grant * I speak only for myself * (remove 'z'
"Ashley M. Kirchner" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I want to move away from
> file.php?var1=1&var2=2&var3=3
> ...and go to
> file.php/1/2/3
[...]
Why? What's wrong
uired entry: $n=$julianday % count($lines)
I appreciate that this depends on the no. of lines in the file and
the size of the file. What I'm looking for is opinions on whether
the use of file() is more efficient than fgets(). It needs more memory,
but it eliminates reading the file twice.
Thank
ss to them at the server level. Hmm, since the directory
always has an index.html, clients will never see the filename
anyway and could only run it by guessing at the name, so
it's a small point.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiat
roup, but I couldn't really
follow the conversations. Is that group for discussing ways to
implement a design template in php so that all pages have the
same appearance? I guess that's what I'm doing with my
mylib.php module - the functions dump out the same nav bars
to every page.
Tha
25 matches
Mail list logo