Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Dušan Novaković
Hi, Here are headers: Response Headers DateWed, 28 Jul 2010 06:41:33 GMT Server Apache/2.2.14 (Ubuntu) X-Powered-ByPHP/5.3.2-1

Re: [PHP] Signing (hand-written signature) pdf document

2010-07-27 Thread Bastien Koert
We use a signature pad and dll from m2sys for something similar to this. It captures the signature, then creates a hash of the signature to store in the db. The only mobile app that I know that uses it is Square which is a mobile payment system. On 7/25/10, Tommy Pham wrote: >> -Original M

[PHP] File Manager with acl

2010-07-27 Thread Ricardo Martinez
Hi! i want ask to the list, if anyone knows a FIle Manager with ACL, written in PHP and MySQL. thanks! -- Ricardo ___ IT Architect website: http://www.rjmc.es

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Micky Hulse
Some style guides you might find interesting (the Code Igniter style guide might be the most relevant to this discussion): Django: Coding style ExpressionEngine: General Style and Syntax Flex: SDK coding conventions and best practices

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Jordan
On 7/27/2010 12:38 PM, Andre Polykanine wrote: Hello viraj, As for classes, it's suggested to start a class name with a capital: class MyBestClass { ... } As for functions and class methods, there are lots of people who name them like this: function the_greatest_function_in_the_world () { ...

RE: Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Bob McConnell
From: tedd > At 1:38 PM +0300 7/27/10, Andre Polykanine wrote: >>Hello viraj, >> >>As for classes, it's suggested to start a class name with a capital: >>class MyBestClass { >>... >>} > > In some languages (I can't remember if it is Java, or Javascript, or > both) the first letter should be lowe

Re: Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Joshua Kehn
Tedd- Java has classes listed with an Uppercase. It could be JS you're thinking of but I'm not sure. Functions (except constructors) and variables have the lowerUpperCamelCase notation. Regards, -Josh On Jul 27, 2010, at 12:55 PM, tedd wrote: > At 1:38 PM +0300 7/27/10, Andre Polykanine wrot

Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread tedd
At 1:38 PM +0300 7/27/10, Andre Polykanine wrote: Hello viraj, As for classes, it's suggested to start a class name with a capital: class MyBestClass { ... } In some languages (I can't remember if it is Java, or Javascript, or both) the first letter should be lowercase, such as: myBestClass

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread tedd
At 3:12 PM +0530 7/27/10, viraj wrote: $firstName is the most readable.. for variables. does anybody have negative thoughts on using the same naming format for method/function and for class names? i guess it's worth sharing! many thanks! ~viraj I like using $first_name. I don't have any pr

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Nilesh Govindarajan
Dude! I found the bug probably, you're using fopen() in 'r' mode which is meant to read ASCII text. Since PDF is a binary file (probably?), you should use binary mode. Try with mode = 'rb' in fopen(). -- Regards, Nilesh Govindarajan Facebook: http://www.facebook.com/nilesh.gr Twitter: http://twit

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Richard Quadling
2010/7/27 Dušan Novaković : > I don't think that it will help :-( I've tried to set different > headers but still I end up with some strange response, like: > > %PDF-1.3 > 3 0 obj > < /Parent 1 0 R > /Resources 2 0 R > /Contents 4 0 R>> > endobj > 4 0 obj > <> > stream > > > So, if we try to l

Re: [PHP] php array in different OS

2010-07-27 Thread jose javier parra sanchez
you are probably getting a memory limit error, check your php.ini 2010/7/21 fyang : > Dear all, > I have a simple test code in different OS ,but it give me a different > result. > the code as follows: > $n= 5; > for($i=0;$i<$n;$i++) > { >$data[]=array(""

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Dušan Novaković
I don't think that it will help :-( I've tried to set different headers but still I end up with some strange response, like: %PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream So, if we try to look into this problem as basic. For example, I'm trying to store file test.pdf from some location on ser

Re: [PHP] Text editor

2010-07-27 Thread Jordan Jovanov
On 27/07/2010 13:53, Ashley Sheridan wrote: On Tue, 2010-07-27 at 13:49 +0200, Dušan Novaković wrote: You can use TinyMCE. It's really easy to integrate in system. Check on official website. Dusan On Tue, Jul 27, 2010 at 12:10 PM, Jordan Jovanov wrote: Hello All I need me to add form for c

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Pete Ford
On 27/07/10 14:16, Peter Lind wrote: 2010/7/27 Nilesh Govindarajan: 2010/7/27 Dušan Novaković: Hello, so when I'm sending the array to model it's like this: $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, "r"); $pdfContent = array( 'file

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Richard Quadling
2010/7/27 Dušan Novaković : > hello, > > I have some problems with storing files in db and retriving them, so > probably I'm doing something wrong :-) > Here is the case: > I have on one of the pages request to generate some PDF files and > store them in database. So, I use FPDF to create files, an

[PHP] socket multithreading problem

2010-07-27 Thread Ümit CAN
without waiting each other ? __ ESET Smart Security Akıllı Güvenlik tarafından sağlanan bilgiler, virüs imza veritabanı sürümü: 5316 (20100727) __ İleti ESET Smart Security Akıllı Güvenlik tarafından denetlendi. http://www.nod32.com.tr

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Peter Lind
2010/7/27 Nilesh Govindarajan : > 2010/7/27 Dušan Novaković : >> Hello, >> >> so when I'm sending the array to model it's like this: >> >> $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, "r"); >> $pdfContent             = array( >>                                        'file'  =>       >> base

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Nilesh Govindarajan
2010/7/27 Dušan Novaković : > Hello, > > so when I'm sending the array to model it's like this: > > $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, "r"); > $pdfContent             = array( >                                        'file'  =>       > base64_encode(fread($fp, > filesize(INVOICE_PA

Re: [PHP] Text editor

2010-07-27 Thread Ashley Sheridan
On Tue, 2010-07-27 at 13:49 +0200, Dušan Novaković wrote: > You can use TinyMCE. It's really easy to integrate in system. Check on > official website. > > Dusan > > On Tue, Jul 27, 2010 at 12:10 PM, Jordan Jovanov > wrote: > > Hello All > > > > I need me to add form for comment to one web site

Re: [PHP] Text editor

2010-07-27 Thread Dušan Novaković
You can use TinyMCE. It's really easy to integrate in system. Check on official website. Dusan On Tue, Jul 27, 2010 at 12:10 PM, Jordan Jovanov wrote: > Hello All > > I need me to add form for comment to one web site, but i want to use some > taxt edtior. Simething similar of this editor > http:

RE: [PHP] Text editor

2010-07-27 Thread Jon Haworth
Hi Jordan, > Do you somebody know some simple text editor with buttons > for bold italic etc. TinyMCE is worth a look: http://tinymce.moxiecode.com/ HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Peter Lind
2010/7/27 Dušan Novaković : > Hello Peter, > > I can't use files from filesystem. Let's say that they are not on the > some mashine where is application that has to show files :-) So it has > to be in exact order as I wrote :-( > That normally doesn't stop people (mounting filesystems across the n

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Dušan Novaković
Hello Peter, I can't use files from filesystem. Let's say that they are not on the some mashine where is application that has to show files :-) So it has to be in exact order as I wrote :-( 2010/7/27 Peter Lind : > 2010/7/27 Dušan Novaković : >> Hello, >> >> so when I'm sending the array to model

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Peter Lind
2010/7/27 Dušan Novaković : > Hello, > > so when I'm sending the array to model it's like this: > > $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, "r"); > $pdfContent             = array( >                                        'file'  =>       > base64_encode(fread($fp, > filesize(INVOICE_PA

Re: Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Peter Lind
On 27 July 2010 13:04, viraj wrote: > so, this is another reason to avoid 'underscore' in variable names. > code looks prettier and clean. That's all in the eye of the viewer: underscores are much prettier to me in variables. That's all just a roundabout way of saying "it's prettier" has no meani

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Dušan Novaković
Hello, so when I'm sending the array to model it's like this: $fp = fopen(INVOICE_PATH.date('Y-m-d').DS.$pdfName, "r"); $pdfContent = array( 'file' => base64_encode(fread($fp, filesize(INVOICE_PATH.date('Y-m-d').DS.$pdfName))),

Re: Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread viraj
yes andre, and in addition.. i have found the 'underscore' becomes a handy delimiter character in certain cases. it's really helpful in auto-loading and in calling user functions and in magic calls. so, this is another reason to avoid 'underscore' in variable names. code looks prettier and clean.

Re[2]: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Andre Polykanine
Hello viraj, As for classes, it's suggested to start a class name with a capital: class MyBestClass { ... } As for functions and class methods, there are lots of people who name them like this: function the_greatest_function_in_the_world () { ... } Maybe it's readable and great, but I have a li

Re: [PHP] storing files in database and retriving them

2010-07-27 Thread Nilesh Govindarajan
Have you checked the headers? Its mostly a mime time issue I feel. What do you see in Content-Type? It should be application/pdf (or application/x-pdf, unsure) for PDF files. -- Regards, Nilesh Govindarajan Facebook: http://www.facebook.com/nilesh.gr Twitter: http://twitter.com/nileshgr Website:

[PHP] Text editor

2010-07-27 Thread Jordan Jovanov
Hello All I need me to add form for comment to one web site, but i want to use some taxt edtior. Simething similar of this editor http://www.seekcodes.com/text-editor.php , but i can not find the code. Do you somebody know some simple text editor with buttons for bold italic etc. Thanks a lo

Re: [PHP] Fastest way to find out if a string contains a certain character?

2010-07-27 Thread Peter Lind
On 27 July 2010 11:46, Ashley Sheridan wrote: > > On Tue, 2010-07-27 at 11:35 +0200, Peter Lind wrote: > > On 27 July 2010 11:27, Ashley Sheridan wrote: > > On Tue, 2010-07-27 at 09:30 +0200, Gary wrote: > > > >> I know there are a number of possible ways of doing this, but I was just > >> wonder

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Pete Ford
On 27/07/10 10:42, viraj wrote: $firstName is the most readable.. for variables. does anybody have negative thoughts on using the same naming format for method/function and for class names? i guess it's worth sharing! many thanks! ~viraj I like to use $firstName, and function firstName(), b

Re: [PHP] Fastest way to find out if a string contains a certain character?

2010-07-27 Thread Ashley Sheridan
On Tue, 2010-07-27 at 11:35 +0200, Peter Lind wrote: > On 27 July 2010 11:27, Ashley Sheridan wrote: > > On Tue, 2010-07-27 at 09:30 +0200, Gary wrote: > > > >> I know there are a number of possible ways of doing this, but I was just > >> wondering if there is an accepted way of doing so which is

[PHP] storing files in database and retriving them

2010-07-27 Thread Dušan Novaković
hello, I have some problems with storing files in db and retriving them, so probably I'm doing something wrong :-) Here is the case: I have on one of the pages request to generate some PDF files and store them in database. So, I use FPDF to create files, and that's working perfect. Then my system

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread viraj
$firstName is the most readable.. for variables. does anybody have negative thoughts on using the same naming format for method/function and for class names? i guess it's worth sharing! many thanks! ~viraj On Tue, Jul 27, 2010 at 3:02 PM, Ashley Sheridan wrote: > On Tue, 2010-07-27 at 10:10 +0

Re: [PHP] Fastest way to find out if a string contains a certain character?

2010-07-27 Thread Peter Lind
On 27 July 2010 11:27, Ashley Sheridan wrote: > On Tue, 2010-07-27 at 09:30 +0200, Gary wrote: > >> I know there are a number of possible ways of doing this, but I was just >> wondering if there is an accepted way of doing so which is better >> than others, performance wise. An idiom, if you like.

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Ashley Sheridan
On Tue, 2010-07-27 at 10:10 +0200, Jordan Jovanov wrote: > Hello Everybody > > I start to write PHP script and all veritable a defined without some > rules. I want to ask to you somebody know how is correct do different > some variable. > Like from next three variable who is correct: > $first

Re: [PHP] Fastest way to find out if a string contains a certain character?

2010-07-27 Thread Ashley Sheridan
On Tue, 2010-07-27 at 09:30 +0200, Gary wrote: > I know there are a number of possible ways of doing this, but I was just > wondering if there is an accepted way of doing so which is better > than others, performance wise. An idiom, if you like. > > If you only need to find if a string contain

Re: [PHP] Video lessons

2010-07-27 Thread Jordan Jovanov
On 24/07/2010 02:14, David Hutto wrote: On Fri, Jul 23, 2010 at 8:13 PM, David Hutto wrote: On Fri, Jul 23, 2010 at 2:35 PM, Dan Joseph wrote: On Thu, Jul 22, 2010 at 10:04 AM, Jordan Jovanovwrote: Im thing that I'm little layse, Do you somebody know PHP VIDEO LESSONS? I'm not sure exact

[PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Jordan Jovanov
Hello Everybody I start to write PHP script and all veritable a defined without some rules. I want to ask to you somebody know how is correct do different some variable. Like from next three variable who is correct: $firstname $FirstName $firstName $first_name etc. I know that from this var