Re: [PHP] PHP frameworks

2011-07-24 Thread Laruence
Hi: if you have high performance need, you can considering Yaf( a PHP framework which is build in PHP extension) http://pecl.php.net/package/Yaf thanks Best regards 惠新宸 Xinchen Hui http://www.laruence.com/ On 2011/7/22 20:38, Floyd Resler wrote: On Jul 22, 2011, at 8:33 AM, Richard Q

Re: [PHP] Three new versions of EasyPHP (WAMP package) with PHP 5.3.6, 5.3.7 RC3 and 5.4.0 alpha2

2011-07-24 Thread Sharl.Jimh.Tsin
On 2011年07月24日 23:42, EasyPHP wrote: Those versions are important ones. For the first time, you can configure Apache (httpd.conf) and PHP (php.ini) directly from the administration page. Thus, you can adapt easily the environment to your needs. Screenshots : www.easyphp.org/screenshots.php Easy

Re: [PHP] Members area Login with permissions!

2011-07-24 Thread alekto
One again, Thank you!! Your excellent advice saved my day ;) Den 24. juli 2011 kl. 16.07 skrev Dajka Tamas: > You’re welcome J > > Yes, you can hide the urls, just google for „url rewriting” or „seo urls”. > Unfortunatelly, this is not basic level stuff and you cannot hide completly > the u

Re: RE: RE: [PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
On 24 Jul 2011 at 19:57, Dajka Tamás wrote: > You want to do it in a greater text, I think. See below. > 1,$s/^>(>*From )/\1/ > > $line = preg_replace ($pattern, $replacement, $line); > > Adding one '>': > > preg_replace('/(^[>]+From )/','>$1', $line) > > Removing one '>': > > preg_replace('/(

Re: RE: RE: [PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
On 24 Jul 2011 at 19:57, Dajka Tamás wrote: > You want to do it in a greater text, I think. > > 1,$s/^>(>*From )/\1/ > > $line = preg_replace ($pattern, $replacement, $line); > > Adding one '>': > > preg_replace('/(^[>]+From )/','>$1', $line) > > Removing one '>': > > preg_replace('/(^>([>]+From

RE: RE: [PHP] Use of preg_replace

2011-07-24 Thread Dajka Tamás
You want to do it in a greater text, I think. 1,$s/^>(>*From )/\1/ $line = preg_replace ($pattern, $replacement, $line); Adding one '>': preg_replace('/(^[>]+From )/','>$1', $line) Removing one '>': preg_replace('/(^>([>]+From )/','$1', $line) Cheers, Tamas -Original Message

Re: RE: [PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
On 24 Jul 2011 at 19:35, Dajka Tamás wrote: > I lost trail, what do you want to do? > > You want to convert > From > > to this: > >>> From The number of > in front of "From " is not known. I want to be able to add or remove one. -- Cheers -- Tim -- PHP General Mailing List (http://ww

RE: [PHP] Use of preg_replace

2011-07-24 Thread Dajka Tamás
Hi, I lost trail, what do you want to do? You want to convert >>>From to this: >>From Or what's the goal? Cheers, Tamas -Original Message- From: Tim Streater [mailto:t...@clothears.org.uk] Sent: Sunday, July 24, 2011 8:07 PM To: PHP General List Subject: [PHP] Use of preg_

[PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
I need to be able to convert a line of the form: >>>From to have either one more or one less > at the front. A web site tells me that the regexps to use are: 1,$s/^>*From />&/ and 1,$s/^>(>*From )/\1/ respectively (there is a single space after "From"). So, if my text string is in $line, I

Re: [PHP] Segmentation Fault

2011-07-24 Thread Floyd Resler
On Jul 23, 2011, at 9:14 PM, Nilesh Govindarajan wrote: > On 07/23/2011 09:38 PM, Floyd Resler wrote: >> I moved to our new server which is using 5.3.2. I'm getting a segmentation >> fault error on certain ODBC queries I run. For some reason when I ask for >> particular columns from the datab

[PHP] Three new versions of EasyPHP (WAMP package) with PHP 5.3.6, 5.3.7 RC3 and 5.4.0 alpha2

2011-07-24 Thread EasyPHP
Those versions are important ones. For the first time, you can configure Apache (httpd.conf) and PHP (php.ini) directly from the administration page. Thus, you can adapt easily the environment to your needs. Screenshots : www.easyphp.org/screenshots.php EasyPHP is 11 years old now. It exists sinc

Re: [PHP] Closing PHP tag best practice?

2011-07-24 Thread Ashley Sheridan
On Sun, 2011-07-24 at 14:55 +0200, mrfroasty wrote: > What I know its a best practice to leave the closing tag in a script > with one php opening tag.Mostly this applies in a script that present a > class, I think its not correct to leave closing tags in template kind > of script where you have s

RE: [PHP] Members area Login with permissions!

2011-07-24 Thread Dajka Tamas
You're welcome J Yes, you can hide the urls, just google for "url rewriting" or "seo urls". Unfortunatelly, this is not basic level stuff and you cannot hide completly the urls. About your issue: that's why I've added to my example's index.php this line: if ( ! $_session['username'] ) {

Re: [PHP] Members area Login with permissions!

2011-07-24 Thread alekto
Thanks a lot :) This solved the user level issue, I can now login with different user levels and get displayed with a link to the corresponding index-pages. But I am now facing a new issue regarding this; when I am entering the URL's of the corresponding index-pages I do get access to the corres

Re: [PHP] Closing PHP tag best practice?

2011-07-24 Thread mrfroasty
What I know its a best practice to leave the closing tag in a script with one php opening tag.Mostly this applies in a script that present a class, I think its not correct to leave closing tags in template kind of script where you have several php tags. Gr Muhsin On 07/24/2011 02:33 PM, Geoff L

[PHP] Closing PHP tag best practice?

2011-07-24 Thread Geoff Lane
Hi All, While watching one of Jeffrey Way's CodeIgniter tutorials, I was gobsmacked when he noted that it was best practice not to have closing PHP tags as closing tags might introduce whitespace issues. So I tried syntax checking a few simple pages and, to my surprise, the syntax checkers accepte

RE: [PHP] Members area Login with permissions!

2011-07-24 Thread Dajka Tamas
I don't think, that separating the code messes up anything, cos it's just separating processing/displaying and you can always debug processing by adding some "echo $var", print_r($var) or var_dump($var). Moreover, by separating the PHP and HTML you get clearer code for both, giving easier debugging

RE: [PHP] Members area Login with permissions!

2011-07-24 Thread Dajka Tamas
Hi, yes, class="message" just sets the HTML class for that div element. BTW, I've found the error: //We get the password of the user $req = mysql_query('select password,id,usr_level from users where username="'.$username.'"'); $dn = mysql_f

Re: [PHP] Members area Login with permissions!

2011-07-24 Thread alekto
Hi, thank you for answering! I do have a session_start() in config.php. For now there is no redirection as you mentioned, but it should display a link to the corresponding next homepage based on user level, which it does not do at this time! I thought was only a class? I already have a $messa

RE: [PHP] Members area Login with permissions!

2011-07-24 Thread Dajka Tamas
One more thought, why not separating the things? I mean separate HTML with a template engine ( like Smarty ) and separate PHP code ( also separated to files ). Like: index.php: if ( ! $_session['username'] ) { $_SESSION['message'] = "Please log in"; header('Location: login.php')

RE: [PHP] Members area Login with permissions!

2011-07-24 Thread Dajka Tamas
Hi, I don't see any redirection in your script! It just displays the link to the corresponding next homepage based on the user level. To really redirect, you should user "header ('Location: URL');". Be aware, that if you pass ANY content out, the additional headers can't be set, so either use outp

Re: [PHP] Members area Login with permissions!

2011-07-24 Thread Negin Nickparsa
you didn't set the $message for example here that you mentioned: You have successfuly been logged in. You can now access the advanced area. change it to $message="You have successfuly been logged in. You can now access the advanced area"; hope it will help.