ok I wrote something "quick and dirty" real quick:
But somehow it doesn't seem to like recursion. Is there something
"special" one needs to do in php ?
here's the code snippet:
function parsehtmlline($line)
{
if (strlen(strstr($line, "#include")) == 0 &&
strlen(strstr($line, "
In my tests, Python can parse both Adler-32 and CRC32, while PHP can
only do Adler-32.
Anyways, I shortened my function:
function fixAdler32($data) {
static $f;
if (!isset($f)) $f = tempnam('/tmp', 'gz_fix');
file_put_contents($f, "\x1f\x8b\x
I think the problem is that I read the lines in PHP, I read them with
fgets and output them with printf.
So the php "interpreter" never gets to see the line.
the apache doesn't parse php output, so it doesn't happen there either.
So.. I figured.. I either had to parse it in php myself OR convi
Yes I do have SSI enabled
here is what I am doing.
I have a php script that reads (a basic) file with html in it. (meaning
it it would have an html/shtml extension it would just work in a browser.
Now I rename the file to myhtml.dat and let the script read it and print
it to stdout.
That works l
Can you just change it to
?
On Nov 7, 2007, at 7:24 PM, Ron Croonenberg <[EMAIL PROTECTED]> wrote:
Hello,
I have a script that ads data to a html template.
However when there is an include in the html like:
it is not "processed", but "just" ends up as a string in the page.
So I guess
Ron Croonenberg wrote:
Hello,
I have a script that ads data to a html template.
However when there is an include in the html like:
it is not "processed", but "just" ends up as a string in the page.
So I guess it needs to be parsed. Is there an easy way to do that ?
thanks,
Ron
Do you h
On Nov 7, 2007 5:22 PM, Joey <[EMAIL PROTECTED]> wrote:
> I have a situation where I am storing data to a blob field. Everything works
> in respect to in and out of the DB, however when we type in a link like so
>
> HYPERLINK
> "http://www.abc.com/subfolder/folder2/"http://www.abc.com/subfolder/fol
Hello,
I have a script that ads data to a html template.
However when there is an include in the html like:
it is not "processed", but "just" ends up as a string in the page.
So I guess it needs to be parsed. Is there an easy way to do that ?
thanks,
Ron
--
PHP General Mailing List (http:
Al wrote:
> Delimiters needed. Can use about anything not already in your pattern.
> "/" is very commonly used; but I like "#" or "%" generally; but, you
> can't use "%" because your pattern has it.
>
> $html = preg_replace("#%ResID#",$bookid,$html);
wont a str_replace() do just fine in this ca
Delimiters needed. Can use about anything not already in your pattern. "/" is
very commonly used; but I like "#" or "%" generally; but, you can't use "%"
because your pattern has it.
$html = preg_replace("#%ResID#",$bookid,$html);
Richard Luckhurst wrote:
Hi
I am in the process of portin
Hi
I am in the process of porting a Perl application to PHP and I have hit a snag
with trying to substitute test within a file. I have looked at the PHP manual
and believe I should be using preg_replace but I have tried the examples and am
not getting the result I would expect. I would appreciate
Sebastian Hopfe wrote:
> Dear Ronald,
>
> I would like to ask you, want kind of session you use in you application.
I get information and put these information into a session variable,
like which language the page should be displayed. I have two frames on
that web page. One is the main page and o
Hello All,
I have a situation where I am storing data to a blob field. Everything works
in respect to in and out of the DB, however when we type in a link like so
HYPERLINK
"http://www.abc.com/subfolder/folder2/"http://www.abc.com/subfolder/folder2/
the link stops at the domain, so the sub
On Wed, 2007-11-07 at 15:21 -0200, Egon Hilgenstieler wrote:
> I have a really complex report which uses a tree-like structure of data
> base objects. Usually it consumes a lot of memory but that it is not
> really an issue because it is an intranet application with few users and
> a dedicated ser
>
> Are you using a compile cache like eaccelerator or APC etc? Sometimes
> it's the cache that doesn't realize things have changed. I use a symlink
> switcher for version releases also and I always flush the eaccelerator
> directory when I do that.
Yes we use APC ( with apc.stat on ). This was the
Hi All,
My apologies if this question was already answered, I just couldn't find
it on the mail archive.
I have a really complex report which uses a tree-like structure of data
base objects. Usually it consumes a lot of memory but that it is not
really an issue because it is an intranet applicati
Dear All,
How to control the character set for php and ms-sql 2000 ?
Due to the php display the non-english ( eg : Chinese ) is ok, but the
DB table is problem...
Thanks !
Edward,
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
They're exactly the same, except of the last 4 bytes. Python
calculates them differently than PHP. PHP follows the standards,
Python does not :]
This would be more concise if PHP included the gzdecode
(http://us2.php.net/gzdecode) function.
On Nov 7, 2007 12:12 AM, Per Jessen <[EMAIL PROTECTED]>
[EMAIL PROTECTED] wrote:
> They're exactly the same, except of the last 4 bytes. Python
> calculates them differently than PHP. PHP follows the standards,
> Python does not :]
That is exactly what is so weird - does Python maybe have its own
implementation of the gzip compression algorithm? I w
This is a much better solution. I didn't realise that str_replace()
accepted arrays as arguments for the search and replace terms.
Mental note: reading mailing lists backwards doesn't work.
Robert Cummings wrote:
> On Tue, 2007-11-06 at 23:24 -0300, Martin Alterisio wrote:
>
>> 2007/11/6, Al
There was no escaping in the original either.
Also, I did assume that the list of replacements would grow to become
pretty large. I wouldn't suggest doing this for a small list such as
that given in the example.
Robert Cummings wrote:
> On Wed, 2007-11-07 at 14:33 +, Mark Summers wrote:
>
On 11/7/07, Sebastian Hopfe <[EMAIL PROTECTED]> wrote:
>
> Dear kNish,
>
> first of all i have formated your PHP Code it looks better now.
>
>
> echo "\n";
> echo " \n";
> echo " Artist\n";
>
> $options = mysql_query("SELECT artist_name FROM artist");
> $options=mysql_fetch_array($opt
Has anyone here experienced a problem where a MySQL server seemingly
closes a connection opened by PHP whilst the PHP script is still
running? The problem only seems to affect scripts that run for a long
time but there are a few things that make it unusual:
1) There is no obvious correlation betw
In hopes that I will not have to invent (or re-invent) the wheel I am
looking for PHP code that does MEID to ESN conversion (telecom folks
will know what I am speaking of). I have been doing a lot of searching
this morning and know the algorithm but was hoping someone already had
it and could share
In news: [EMAIL PROTECTED] - "Brad" wrote :
> Sure thing,
>
> The site is http://www.gaymillionaire.net
>
> You can see that I have a bunch of text underneath the flash
> animation in the middle.
> I am trying to fill the dead space to the right of it.
>
> In the code, I can see where to widen the
On 11/7/07, Sebastian Hopfe <[EMAIL PROTECTED]> wrote:
>
> Dear Vanessa
>
> You can use the "SELECT ... INTO OUTFILE 'file_name' " with
> mysql_query($vAnf, $dbconn);
> For the syntax you can have a look at
> http://dev.mysql.com/doc/refman/5.0/en/select.html
>
> Should you be allowed to send syste
On Wed, 2007-11-07 at 14:53 +, Mark Summers wrote:
> There was no escaping in the original either.
>
> Also, I did assume that the list of replacements would grow to become
> pretty large. I wouldn't suggest doing this for a small list such as
> that given in the example.
Given that you expe
Per Jessen wrote:
> Brad wrote:
>
>> I just picked up an account to fix a website and the code is making no
>> sense.
>
> Brad, it's been barely six hours since you first posted that question.
>
> 1) be patient.
> 2) it's a lot of code to ask someone else to look at for you. I would
> start
On Wed, 2007-11-07 at 14:33 +, Mark Summers wrote:
> This is a first attempt but the general idea is that the regular
> expression matching is done in one operation and then str_replace() is
> called only as many times as required instead of once for every line in
> your list. Also, str_replac
This is a first attempt but the general idea is that the regular
expression matching is done in one operation and then str_replace() is
called only as many times as required instead of once for every line in
your list. Also, str_replace() is faster than ereg_replace().
"n",
"á" => "a",
Brad wrote:
> In the code, I can see where to widen the table.
> One would think that php would fill the dead space if the is nothing
> blocking it.
> But it is not.
Like Jochem already said, your question is probably best asked on an
html mailing list. It's not really a PHP issue.
/Per Jessen
Sure thing,
The site is http://www.gaymillionaire.net
You can see that I have a bunch of text underneath the flash animation in
the middle.
I am trying to fill the dead space to the right of it.
In the code, I can see where to widen the table.
One would think that php would fill the dead space i
Brad wrote:
> I just picked up an account to fix a website and the code is making no
> sense.
Brad, it's been barely six hours since you first posted that question.
1) be patient.
2) it's a lot of code to ask someone else to look at for you. I would
start by narrowing down the problem/code a
Dear kNish,
first of all i have formated your PHP Code it looks better now.
\n";
echo " \n";
echo " Artist\n";
$options = mysql_query("SELECT artist_name FROM artist");
$options=mysql_fetch_array($options);
echo '';
enhanced_list_box(array(
'table' => 'artist',
'value_field' =>
Dear Ronald,
I would like to ask you, want kind of session you use in you application.
regards
Sebastian
"Ronald Wiplinger" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
I use at the first page a session variable to set a flag.
After a few pages, or if somebody wait too l
Dear Vanessa
You can use the "SELECT ... INTO OUTFILE 'file_name' " with
mysql_query($vAnf, $dbconn);
For the syntax you can have a look at
http://dev.mysql.com/doc/refman/5.0/en/select.html
Should you be allowed to send system-queries to the Server, than you should
have a look to http://dev
On 07/11/2007, kNish <[EMAIL PROTECTED]> wrote:
> Hi,
>
> A newbie question. I have more than one table to access from a database.
>
> When I use the code as below, it gives no response on the web page.
>
> What may I do to run more than one table from the same database into the
> script.
Firstly,
Jon Westcot wrote:
> Hi Chris:
>
...
> That is, I need to close the single quote, place a comma after the
> field, and then add in another opening quote. One other thing: I suspect I
> need to use addslashes() to the elements in $data -- is there a way to do
> this with one statement as you
Hi,
A newbie question. I have more than one table to access from a database.
When I use the code as below, it gives no response on the web page.
What may I do to run more than one table from the same database into the
script.
BRgds,
kNish
.
.
.
.
Artist
';
enhanced_list_box(array(
'table'
[EMAIL PROTECTED] wrote:
> The documentation for zlib says that it expects an Adler-32 checksum
> at the end of the file.
>
> PHP follows this [largely outdated] standard.
Uh, nothing to do with PHP, the code is in zlib.
> Python, on the other hand, doesn't, and uses a different checksum,
> CR
hello thereis there a way to create a back-up database through PHP?...i
would like to create a file maybe an sql file that would served as back up
of my database. Im using mysql database. I know i could use phpmyadmin to do
this but i just like to have a function that would do this without g
41 matches
Mail list logo