Jump to content

Lumio

Members
  • Posts

    679
  • Joined

  • Last visited

    Never

About Lumio

  • Birthday 05/24/1990

Contact Methods

  • AIM
    butterbreisingt

Profile Information

  • Gender
    Male
  • Location
    Austria

Lumio's Achievements

Member

Member (2/5)

0

Reputation

  1. What do you think about the template-engine blade? It uses eval for rendering.
  2. What do you mean? Is it that bad?
  3. Hi guys! I just heard about Laravel www.laravel.com and wanted to know, what you think about it. I usualy use CodeIgniter but thought that the way Laravel does routing is interesting So what do you think and for what apps do you think is it good for? Thanks
  4. Hi, I'm an owner of a root-server. I have it in the office of my work. But now I'm thinking about another place where I have a better connection. In the office I only have 2 Megabit up and down. A bit too slow Now I'm looking for a good and also cheap solution. I found the following: http://netdirect.de/c/cms/front_content.php?idcat=3&idlang=1 But are there others?
  5. Maybe this will work: <?php if (array_key_exists('item_retail', $_GET)) echo floatval($_GET['item_retail']) * .75
  6. Google: php template engine Result: http://www.smarty.net/ You can also create your own template-engine by using str_replace, or if you want to do some advanced stuff: preg_replace and preg_replace_callback Think about caching (by saving your template and content in an extra file) And include is not a good way to do so.
  7. Thank you I made it a little bit different now: /\({\$[\w\d\[\]^\n]+\})|(\<\<.+?\>\>)/
  8. Okay. In the first case I face the following data: a little string with {$var} in it the second case: a little string with <<foo bar >> in it The first expression should just match in one line, the second in multiples.
  9. Hello! I got two expressions: /(\{\$[\w\d\[\]]+\})/ ans /(\<\<.+?\>\>/s How can I merge these two expressions?
  10. is that quicker? but what if I want to say everythink but not PLAIN?
  11. No, they are the only one. Without any other text.
  12. Hi! Thanks for your quick answere. Well I do have more keywords like that. For example K_IF or K_ELSE or K_ENDIF. Let's say, I only want to let a condition get true, if it is not PLAIN. Okay, for that reason I can use a normal if-statement. But lets say I don't want to have lets say PLAIN and also not K_ENDIF. So I thought ^PLAIN|^K_ENDIF would do it, but no. It doesn't I want to match the whole key.
  13. Hello, I have a little problem with regular expressions. I got the following string: $str = "PLAIN"; So what I want to do now is to say, that if the string is PLAIN, that it is not true, but with a regular expression. I tried <?php $str = "PLAIN"; $r = "^PLAIN"; var_dump(preg_match("/($r)/", $str)); But it always gets 1 and not 0. Why?
  14. Try the following expression: /\<div class\=[\"]{0,1}votes[\"]{0,1}\>(.*?)\<\/div\>/s If also the class is different, make something like [\w\d]+ instead of votes. Anyway, the /s in the last position allows you to look over the lineedges
  15. Instead of if (@mysql_num_rows($result) == 1) { make if ($result != false && mysql_num_rows($result) == 1) { This is going to check $result if the query was ok or not. If not the if-statement gets false. Also check if mysql_error() is empty or not.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.