Re: [PHP] Smarty Question

2007-10-01 Thread Stut
Shahrzad wrote: IRIran.netHi, I want to replace a php variable with a javascript variable inside

Re: [PHP] Classes and access to outside variables

2007-10-01 Thread Nathan Nobbe
On 10/1/07, Merlin <[EMAIL PROTECTED]> wrote: > > Hello everybody, > > thank you for all your answers. I am sorry but I just realized that > there is an huge difference between PHP5 and PHP4 considering OOP. > Unfortunatelly I am still running PHP4.x and cant change this over > night. However I sti

Re: [PHP] Problem with pasting text from word into php form

2007-10-01 Thread Robert Cummings
On Mon, 2007-10-01 at 08:01 +0200, Crab Hunt wrote: > Hi, > Is there a fix for removing the junk characters that appear when we copy and > paste some text from Microsoft word into a php form ? For example the double > quotes "" turn into something like *â??* > > thanks in advance. http://www.goog

[PHP] php function

2007-10-01 Thread edwardspl
Dear All, Mine is FC6 System. So, the php come with it... If disable the function of phpinfo(), then all of the setting will be returned to the default ! Any solution for help ? Thanks ! Edward. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

[PHP] manipulating CSV files

2007-10-01 Thread pere roca
hi folks, I have a CSV file. Data is separated by ','. For example: -94.86524,42.059444,A,B,X -96.86524,42.059444,A,B,Y1 -99.86524,42.059444,A,B,C1 I want to interactively insert the user_name (passed by a php variable) into the first "field" to insert then on my DataBase. Pet

Re: [PHP] manipulating CSV files

2007-10-01 Thread Wolf
/ $filename=""; // Name of your CSV file $file_path = ""; // whatever your files are pathed $filename = $file_path.$filename; $handle = @fopen($filename, "r"); $k=0; $entry = $file_path . "entry_file.txt"; // I use this to make a new entry file $entry_file = fopen($en

Re: [PHP] Problem with pasting text from word into php form

2007-10-01 Thread tedd
At 8:01 AM +0200 10/1/07, Crab Hunt wrote: Hi, Is there a fix for removing the junk characters that appear when we copy and paste some text from Microsoft word into a php form ? For example the double quotes "" turn into something like *â??* thanks in advance. Crab: That's something I'm worki

[PHP] Secure Image Storage

2007-10-01 Thread Kevin Murphy
Hello all, Following up with my success last week with putting downloadable files in a directory above the web root and then using a combination of fopen and stuff to download the file, I am now trying to do something similar with images. However, what I am trying to do is to put an image

Re: [PHP] Secure Image Storage

2007-10-01 Thread Jon Anderson
Kevin Murphy wrote: Hello all, Following up with my success last week with putting downloadable files in a directory above the web root and then using a combination of fopen and stuff to download the file, I am now trying to do something similar with images. However, what I am trying to do

Re: [PHP] Secure Image Storage

2007-10-01 Thread Jim Lucas
Kevin Murphy wrote: Hello all, Following up with my success last week with putting downloadable files in a directory above the web root and then using a combination of fopen and stuff to download the file, I am now trying to do something similar with images. However, what I am trying to do

Re: [PHP] manipulating CSV files

2007-10-01 Thread Jim Lucas
Wolf wrote: / $filename=""; // Name of your CSV file $file_path = ""; // whatever your files are pathed $filename = $file_path.$filename; $handle = @fopen($filename, "r"); $k=0; $entry = $file_path . "entry_file.txt"; // I use this to make a new entry file $entry_fi

[PHP] strpos error (I'm missing something obvious)

2007-10-01 Thread Kevin Murphy
Overly simplified version of my code. $site = "http://www.wnc.edu";; $referer = $_SERVER["HTTP_REFERER"]; echo $referer; // the output is correct at: http://www.wnc.edu/test/ if (strpos($referer,$site) === TRUE) { echo "yes"; } Why doesn't it echo out "yes"? I know I am doing somethin

Re: [PHP] strpos error (I'm missing something obvious)

2007-10-01 Thread Carlton Whitehead
Kevin, Try this instead: $site = "http://www.wnc.edu";; $referer = $_SERVER["HTTP_REFERER"]; echo $referer;// the output is correct at: http://www.wnc.edu/test/ if (is_int(strpos($referer, $site))) { echo "yes"; } Why did I make this change? strpos returns an integer representing the

Re: [PHP] strpos error (I'm missing something obvious)

2007-10-01 Thread Kevin Murphy
I fixed this by changing === TRUE to !== FALSE, so I think I am good to go now. But would still like to know why TRUE doesn't work. Thanks. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-mail and website

Re: [PHP] strpos error (I'm missing something obvious)

2007-10-01 Thread Carlton Whitehead
Kevin, I think I addressed that in my last message, if a bit indirectly. strpos will never return a boolean true. It will only ever return either the integer where the needle is found in the haystack, or false if said needle is not found in said haystack. Check the Return Values section at

RE: [PHP] strpos error (I'm missing something obvious)

2007-10-01 Thread Jay Blanchard
[snip] I fixed this by changing === TRUE to !== FALSE, so I think I am good to go now. But would still like to know why TRUE doesn't work. Thanks. [/snip] !== FALSE is not good either, it is not a valid test strpos returns the numeric position of the first occurrence of needle in the haystack s

Re: [PHP] strpos error (I'm missing something obvious)

2007-10-01 Thread Tom Swiss
[EMAIL PROTECTED] ("Jay Blanchard") writes: > !== FALSE is not good either, it is not a valid test > > strpos returns the numeric position of the first occurrence of needle in > the haystack string. Except when needle doesn't occur in string, in which case "If needle is not found, s

[PHP] possible GMP bug?

2007-10-01 Thread Tom Swiss
I believe I have discovered a bug with the GMP functions. But since we're sticking with the ancient PHP RedHat gives us (a patched-up 4.3.9), I'd like to ask others with more modern installations to check if they get the same behavior. (Then I know whether to pester the PHP folks, or to peste

[PHP] multiple curl and web service

2007-10-01 Thread H u g o H i r a m
Hi, I am having this problem, I am retrieving some data from a MySQL DB, and using it to post a cURL, what I am calling is a web service, and I have 3 options to do it: SOAP, GET and POST, I am not very familiar with SOAP, so I am using POST, in response I get a XML on each call to the web se

[PHP] I need an opion!!! Thanks!

2007-10-01 Thread Sebastian Dieser
Hi, we have been using the following codes on our site for a year and I wanted to know if these codes are just spaghetti or its actual usable code. I know it can be bettered a lot I just need opinions if the codes can be used a while more until we reprogram everything as a complete CMS system.

Re: [PHP] counting with leading zeros

2007-10-01 Thread Martin Alterisio
// glob returns an ordered list (rtfm: man glob) // relies on the use of the operator ++ to generate string sequences. function lastFileInSequence($path, $prefix, $first, $suffix) { return array_pop(glob($path . "/" . $prefix . str_repeat('?', strlen($first)) . $suffix)); } function nextFileI

Re: [PHP] I need an opion!!! Thanks!

2007-10-01 Thread Chris
Sebastian Dieser wrote: Hi, we have been using the following codes on our site for a year and I wanted to know if these codes are just spaghetti or its actual usable code. I know it can be bettered a lot I just need opinions if the codes can be used a while more until we reprogram everything a