I want to integrate articles into existing pages, something like
Can anyone recommend a suitable blog script?
Thanks!
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
On Wednesday 20 December 2006 02:24, Tony Marston wrote:
>
> "Niels" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Hi list,
>>
>> I'm writing a PHP program and I've got a number of concerns. The program
>> is
>
g, thanks.
> How about iterators? You can have objects that look like arrays yet they
> take much less memory:
>
> $rs = $db->query($select); # query the db
> foreach ($rs as $row) { # fetch the row
> whatever($row);
> }
>
"takes much less memory" is exactly the kind of advice I'm looking for. I've
found very few usable guides to such optimizations. Could you possibly give
me a specific example of an array and a similar object with this great
difference in memory consumptions?
Thank you for your answer,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.1 is a lot better
> (from what I've heard anyway. I never used 5.0.x)
>
I think I'll move to 5.2 within a couple of months and slowly start using
some of the new features.
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
elling reasons do I have to start using exceptions and OOP-5?
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the bits that won't be changed
> $staying = $existing & ~$mask; # = 176 = 1011
>
> Combine them together
> $result = $changing ^ $staying; # = 188 = 1000
>
>
> David
[snip]
Thank you very much, I appreciate it!
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tuesday 13 June 2006 12:22, Jochem Maas wrote:
> Niels wrote:
>> Hi,
>>
>> I have a problem I can solve with some loops and if-thens, but I'm sure
>> it can be done with bit operations -- that would be prettier. I've tried
>> to work it out on p
On Tuesday 13 June 2006 12:32, Ford, Mike wrote:
> On 13 June 2006 10:31, Niels wrote:
>
>> Hi,
>>
>> I have a problem I can solve with some loops and if-thens,
>> but I'm sure it
>> can be done with bit operations -- that would be prettier.
>> I&
do I combine A, B and C to get that result?
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t things not
> related to YAHOO
Hands off Rasmus! He's a good guy!
Thank you for your answer,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Monday 05 June 2006 13:32, David Robley wrote:
> Niels wrote:
>
>> Hi,
>>
>>
>> I have a set of nodes. Each node has a parent and so the set can be
>> thought of as a tree. I want to show that tree somehow on a webpage,
>> served by PHP. I cannot
On Sunday 04 June 2006 20:39, tedd wrote:
> At 8:00 PM +0200 6/4/06, Niels wrote:
>>
>>
>>> Using a combination of css and php will do what you want, I'm sure of
>>> it.
>>I want world peace...
>
> Well, if we were all programming php, we would
On Sunday 04 June 2006 19:49, tedd wrote:
> At 7:26 PM +0200 6/4/06, Niels wrote:
>>If I were to make a "real" tree, I wouldn't use a table. It's too
>>difficult to manage IMO. I'd probably look for a generic graph algorithm
>>somewhere, and try some
Hi,
On Sunday 04 June 2006 19:08, tedd wrote:
> At 3:38 PM +0200 6/4/06, Niels wrote:
>>On Sunday 04 June 2006 15:30, tedd wrote:
>>
>>[snip]
>>
>>> You can dynamically generate a table and place text (and/or color) the
>>> cells that are nodes --
your answer, I appreciate it!
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
=30;
global $tree;
foreach ($nodes as $nodeID => $node) {
if ($node['parent']!=$start) {continue;}
$tree.="{$node['name']}";
tree($nodes, $nodeID, $indent);
}
return $tree;
}
Thanks!
//Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Sunday 04 June 2006 18:37, Mike Bellerby wrote:
> You could do it by dynamically generating an image.
>
> Mike
[snip]
Yes. But how? I've settled for a simpler solution -- see my answer to Martin
Alterisio.
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
em with using a table is that cells can't be individually sized.
However DIVs or TDs is a minor problem. The major problem is to walk
through the tree properly (recursively probably), and remember the
connections. And then rendering them...
Thank you for your answer,
Niels
--
PHP General Mailing List
On Sunday 04 June 2006 14:58, tedd wrote:
> At 2:07 PM +0200 6/4/06, Niels wrote:
>>Hi,
>>
>>
>>I have a set of nodes. Each node has a parent and so the set can be
>>thought of as a tree. I want to show that tree somehow on a webpage,
>>served by PHP. I cann
their connections. It's
not a trivial task, IMO, but doable. Possibly somebody has already made
something similiar, but I can't find anything on Google. Can anybody point
me to helpful information?
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: htt
Thank you for your answer. I wasn't trying to write exif data to an image,
just to read it. I've got it all working now.
//Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
misunderstand the situation.
I've got a database of images (image data) and their exif data, I'm not
uploading any files. I want to make new entries in that DB, new images that
are thumbnails of the present images. I can do that without creating files,
but I can't get exif dat
image in the database you can get the info and store it
> then.
No, I can't. I've got some images, with exif information in the DB. I'm now
generating thumbnails for them, and also storing those in the DB. No files
at all, and therefore I can't read exif data for the thu
On Saturday 25 February 2006 16:36, Niels wrote:
> Hi,
>
> I have some images in a database -- I mean, the actual data. There are no
> files.
>
> I want to read Exif data for these images, but the read_exif_data()
> function wants a file. I suppose I could write the images
ere a folder I can count
on being allowed to write to?
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ave a certain id . . .)
Excellent example! I think you've answered my question: I'll have to keep
using both NAME and ID.
Thanks a lot!
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
s support using only id?
//Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hat browsers do what?
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> BTW - the script works fine on my server.
Thanks for checking.
//Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
me
anything about this problem?
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Andy,
try that one: /^[a-zA-Z]{3}|\p{Sc}$/u
You don't want to put \p{Sc} in square brackets as \p{Sc} itself already
is a character class. Umm.. Kinda don't make myself clear here, do I?
You just don't want to, it's 5am in the morning here I gotta go to the
next bed ;p
Re
Andy,
you might want to check out
http://www.regular-expressions.info/unicode.html
Please note two things while using the described syntax:
1. You have to additionally use the u modificator.
2. While \p{Ll} for instance works in PHP, \p{Lowercase_Letter} doesn't.
Regards,
Niels
>
Why should this be "unsafe" (whatever the heck that means) in any way? Of
course you can do it.
Regards,
Niels.
[sorry for mailing to your private address. wrong button :)]
> Anyway, can you do *this* safely as a DOCUMENTED FEATURE:
>
> foreach($array as $k => $v){
>
> so I'd suggest taking a look at the Perl libraries for ICQ/AIM and
> other IM clients that you can probably adapt to PHP without too much
> work. Check www.cpan.org for this.
Or "sniff" the traffic of a "normal" ICQ client and learn the protocol
that way. Alternatively you could search for a l
t based editor) an then just copy 'n'
paste the changes back into the page.
So I'd say the mediawiki approach as outlined by Jasper is the best
possible in the context of a stateless protocol such as HTTP.
Regards,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to
change it.
Anymory ideas?
Regards,
Niels
Jasper Bryant-Greene:
> Niels Ganser wrote:
> > I use a Debugger-Class to collect debugging information (now that was
a
> > hard guess, wasn't it..) during script runtime. In order to collect
> > everything there is to colle
ubmitted data is.
Regards,
Niels.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
g and return
an error if ".." is found in it. Maybe I'm a little paranoid but is this
really enough?
For clarification: All paths are prefixed with some kind of a root path.
All images within this root path may be accessed but "jumping" out of it
should not be allo
No way.
PHP is server based you can't trigger anything on the client side. Use
Javascript, ActiveX, XUL or the like.
> What's the best way to send an executable to a client desktop in PHP?
>
> I'm doing a project where we need to check and see which files need to
> be updated on a client-desktop
> Unfortunately, you can't pass along a username/password to apache in a
> simple way.
Well, what about http://user:[EMAIL PROTECTED] I personally wouldn't send
cleartext passwords to a client's browser which might cache them and
stuff, but possible it is.
--
PHP General Mailing List (http://w
[3] and
reformat it with strftime [4].
Regards,
Niels
[1]
http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html#id2728257
[2] http://php.net/manual/en/ref.datetime.php
[3] http://php.net/manual/en/function.strptime.php
[4] http://php.net/manual/en/function.strftime.php
> I get my t
Choose the right module. Search your apache config for "LoadModule
php5_module" resp. "LoadModule php4_module".
> How to configure apache to select one particular from several
> installed php?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
string implode(string glue, array pieces) [1]
Regards,
Niels
[1] http://php.net/manual/en/function.implode.php
> Pardon my ignorance and lack of ability to form the right search for
> google, but I'm trying to figure out if there's a simple function in
> PHP to convert array
be appreciated. Thanks in advance,
Niels.
[1] http://marc.theaimsgroup.com/?l=php-dev&m=112556389406774
[2] http://bugs.php.net/bug.php?id=34377
[3] http://bugs.php.net/bug.php?id=33772
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
em to find
one.
And the reason I use SELECT * is that there is more than one field I
need to output. There is only one in the example so that the post
wouldn't be to voluminous.
Niels Riis Kristensen
([EMAIL PROTECTED])
NRK Group
- Electronic Music Engraving
- Webhosting
- Dynamic
w_var; to see what is returned right here
Allready did, no result.
Niels Riis Kristensen
([EMAIL PROTECTED])
NRK Group
- Electronic Music Engraving
- Webhosting
- Dynamic Web design
- E-Lists hosting
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
utput. There is only one in the example so that the post
wouldn't be to voluminous.
Niels Riis Kristensen
([EMAIL PROTECTED])
NRK Group
- Electronic Music Engraving
- Webhosting
- Dynamic Web design
- E-Lists hosting
On 31/05/2005, at 22.53, [EMAIL PROTECTED] wrote:
which ar
";
print "
window.print();
";
}
_
Needles to say, I hope, that it doesn't work!
Niels Riis Kristensen
([EMAIL PROTECTED])
NRK Group
- Electronic Music Engraving
- Webhosting
- Dynamic Web design
- E-Lists hosting
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
";
print "
window.print();
";
}
_
Needles to say, I hope, that it doesn't work!
Niels Riis Kristensen
([EMAIL PROTECTED])
NRK Group
- Electronic Music Engraving
- Webhosting
- Dynamic Web design
- E-Lists hosting
smime.p7s
Description: S/MIME cryptographic signature
";
print "
window.print();
";
}
?>
_
Needles to say, I hope, that it doesn't work!
Niels Riis Kristensen
([EMAIL PROTECTED])
NRK Group
- Electronic Music Engraving
- Webhosting
- Dynamic Web design
- E-Lists hosting
smime.p7s
Description: S/MIME cryptographic signature
Hi
I am using a Unix machine (Mac) but can't find ways to print to my
local printer. Plenty of information about printing from a PC, but none
from a mac. Can that be, that you can't print from php to mac?
Niels Riis Kristensen
([EMAIL PROTECTED])
NRK Group
- Electronic Music
working before.
Can anyone help?
Med venlig hilsen
Niels Riis Kristensen
-
NRK Gruppen
- Elektronisk nodeengravering
- Webhotel
- Webdesign
- Udøvende musik
---
Send penge sikkert over Internettet!
Klik her: https://www.paypal.com/refer/pal=EAJLSE5TQELFC
--
PHP General Mai
d if their security measures don't hold up, then
we're in big trouble. I believe they're using PAM somehow, I'll look into
that. Until then, it's a sudo scheme.
Thanks again,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sn't that almost as good?
- Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
this is a good
reason to use tried-and-tested modules like PEAR -- but they can be faulty
as well.
My main point isn't that I want to be 100% certain nothing will ever go
wrong with my program. That's quite unrealistic. But I'm looking for
solutions to the problems everybody's pointing out.
Thanks again,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e things I've asked for is articles and tutorials, but there
apparently aren't any on this subject. I can find many on validating user
input, securing sessions and that kind of thing. But not this, no "howto
make php run useradd safely". I've seen many other people have pro
er, but probably with internet access to the application
some time in the future.
So my question is: Is sudo the best solution?
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ous entry points to a system for a cracker. But still, the
article doesn't really help.
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jennifer Goodie wrote:
> I wouldn't use system calls to move files around. PHP has built in file
> system functions. Why shell out to do something that is built in?
Well, the apache user really shouldn't have access to the entire file system
-- that's the problem.
T
his?
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
a cronjob scan that. But that
solution is no longer good enough -- I need to call system functions
directly.
I can't find any thorough articles on this subject, but surely someone here
has some ideas or some pointers.
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To uns
+(.*)\+\+\]#Uis",my_function($1),$str); doesnt work
at all and lots of other variations do not as well.
Please to be helping.
Greets
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
g T_VARIABLE or
'$' in /www/htdocs/v035923/pages/template-engine/engine.php on line 26
Line 26 is this one:
$template = preg_replace("!{for loops=(.*)} (.*)
{/for}!U",code($1,$2),$template);
Many thx 4 help
Niels Uhlendorf
--
PHP General Mailing List (http://www.ph
I don't mean any disrespect, but I just want to check that the basics are
OK, sometimes I forget stuff like that myself: Did you click a link to go to
your test page?
"Stephen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
For some reason my webhost doesn't allow the HTTP_REFERER var
LOL
I like PHP, but I also like wet girlies. But the two are not interchangable,
which is a pitty, becouse sometimes I really could use a wet girl, and I
only have PHP
"Khalid El-Kary" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> sorry, but if PHP (a great piece of knowledg
You want to add a new line every time your form is submittet, am I right?
Then you should open the file for appending, using fopen(filename, "a")
instead of "w"
"Ryan Holowaychuk" <[EMAIL PROTECTED]> wrote in message
news:!~!UENERkVCMDkAAQACABgAu5ugyx6+hUW5gsOu6grgVMKA
AAA
$file = file('filename');
$line = end($file);
for ($i=0; $line && $i<10;$++)
{
list (. and so on...
$line = prev($file);
}
"Webdev" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
How to grab the last -n lines from a data file and display the stored data
Only the the last 1
Yes, $HTTP_POST_FILES is depricated, but it still works in PHP 4.
"John Taylor-Johnston" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> $HTTP_POST_FILES as opposed to $_FILES is older syntax? $HTTP_POST_FILES
is still compliant?
> John
>
--
PHP General Mailing List (http://www.p
Since input from a form are strings, you can check like this:
if ($_POST['your_input_name'] == '')
// field is empty
"Shaun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is there an easy way to scan through an array of values sent from a form
to
> see if any of them are empty?
By the way, beware of possibly buggy code:
strpos() will return 0 if the string begins with '-', but it will return
FALSE if '-' is not found in the string.
Since both 0 and FALSE will evaluate to boolean false in your condition, you
may get weird results.
Use this instead: (strpos($a, '-') !==
That depends on the way you run PHP
If you run it a a server module, it may be more efficient.
If not, then it it less efficient than CGI, as the PHP script engine is a
CGI program itself, and has to compile and run your script after it gets
started itself.
"Spyproductions Support Team" <[EMAIL P
I have created a simple template engine extension. It is published at
http://zhat.dk/template/
It is very simple to install and use, and a PHP alternative (an include
file) is also provided.
No documentation available yet (sorry!!!), so have a look at the example
scripts.
--
PHP General Mailin
PHP is not text markup, it is a kind of programming language. You can't just
validate code for "correctness", only for valid syntax. It may still contain
bugs. The syntax is checked by the parser, which is invoked when you run
your script.
Regarding HTML-output from your script, you can make sure
So when you do request for:
your_script.php?var=hello%20world
And put this in your script
you get
hello%20world
printed?
"Sunfire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> tried everything except session vars and the query string is still
broken...
> no matter what i do for
it arrive at 17:22?
>
> "Niels Andersen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > When I post something here, it first appears several hours later. How
can
> it
> > be so?
> >
> >
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
When I post something here, it first appears several hours later. How can it
be so?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Do you have a DNS server on you network? Without it, it will not work.
"Chris Blake" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Greetings,
>
> Th command
>
> echo gethostbyaddr("ip.number.inserted.here");
>
> returns the name of the server when it`s an internet address.
> Is the
> Not sure how you define an extension, but you could take a look at my
> web site www.phpscriptsearch.com and see if it applies to listing it
> there. But like I said, it depends what you mean by extension.
Extension like in binary that is either an integral part of PHP or a
loadable module.
> A
Hello!
I have made a really great (or at least that is what I think) extension,
which I think everybody should use :))
Where should I publish it?
Is there any chance that it will make its way into a future distro?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
Data from POST is a hash table of strings, so you should use this to check
for zero:
if ($_POST['field'] == "0")
// Zero was entered
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> i am having a terrible time killing the session
> someone please please help me...
This one works for me:
session_start();
$_SESSION = array();
session_destroy();
But I am surprised that there is no single command to kill the session.
The semantics of "session_destroy()" suggest that it do
Check that php_gd2.dll is in your C:\PHP\ folder.
"Anthony Ritter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I run the following script:
>
> phpinfo();
> ?>
>
> // the page loads o.k. when the semi-colon remains as in:
> ;extension=php_gd2.dll
>
> but if I remove the semicolon
Hello,
I did my first PHP extension (a simple template engine), and I found out I
could not ude V_OPEN() - it simply crashed PHP.
I then searched the web and found somebody mentioning something about a
function called VCWD_OPEN(), which works perfectly, but is not
documented
Any idea why did
I want to compile an extension, let's say the zip extension.
So I do the following:
cd /usr/src/php-4.2.3/ext/zip
phpize
Now, I understand that this should result in a shared library being
produced, but I can't find it.
Also, during the phpize process, I get following warnings:
perl: warning: Se
There mey, but need not be a space. As far as I know, the option scanner in
mysqldump ignores spaces between short options and their values.
"John Taylor-Johnston" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks!
>
> > exec("mysqldump -c -q database -u user -ppassword", $sql)
hi,
how to chang [url=%link%]%descr%[/url] in %descr%
thx 4 help.
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
characters because it won't print!
This was supposed to be an easy shortcut before learning mysql but...
Thanks for any help
niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
87 matches
Mail list logo