Search:

Type: Posts; User: techietim; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    2,544

    That php.ini configuration option you are...

    That php.ini configuration option you are speaking of is for caching only. There is a page which describes how it works [1].

    [1] - http://www.php.net/manual/en/function.session-cache-limiter.php
  2. Replies
    48
    Views
    17,296

    3600...

    3600...
  3. Replies
    5
    Views
    2,544

    Yes, you should do something along these lines. ...

    Yes, you should do something along these lines.

    An example would be:


    session_start();
    if(isset($_SESSION['time']))
    {
    if(time() - $_SESSION['time'] > 3600) //1 hour
    {
  4. Replies
    9
    Views
    2,957

    The cookie you are creating only has the lifetime...

    The cookie you are creating only has the lifetime of the browser session. You may want to consider setting the expiry date on the cookie to sometime in the semi-far future.
  5. Replies
    6
    Views
    2,020

    php.net/preg_replace_callback...

    php.net/preg_replace_callback
  6. Replies
    6
    Views
    2,020

    It should be: $case_changed =...

    It should be:


    $case_changed = preg_replace_callback('/<em>(.*) (.*)<\/em>/', 'italic_word', $case_changed)
  7. Replies
    6
    Views
    2,020

    function change_case($arr) { return...

    function change_case($arr)
    {
    return ucwords($arr[1]) . $arr[2];
    }

    $case_changed = '<em>Hello World</em>';
    $case_changed = preg_replace_callback('/<em>(.*) (.*)<\/em>/', 'change_case',...
  8. Replies
    5
    Views
    1,839

    This documentation...

    This documentation should help you out.

    Basically, just replace that $1 with a \1.
  9. Replies
    3
    Views
    27,648

    Sticky: Can you cite where you got this information from?...

    Can you cite where you got this information from?

    You also should explain items like #17, where PHP novices would most likely not know the difference.
  10. Thread: opendir?

    by techietim
    Replies
    11
    Views
    2,677

    Resolved This is probability a better solution for what...

    This is probability a better solution for what you're trying to do, just make sure you add in the file extensions you wish to display:


    $files = glob('./images/*.{jpg,png,gif}', GLOB_BRACE);
    ...
  11. Replies
    1
    Views
    2,608

    If you're coming from a language from Java, the...

    If you're coming from a language from Java, the former code is easier to work with.

    However, C# handles public properties more like the second block of code. So if you want to make your code feel...
  12. Replies
    3
    Views
    2,730

    It is a server configuration issue, as the code...

    It is a server configuration issue, as the code works properly. Contact your web host (1&1) and see what's up.
  13. Replies
    3
    Views
    2,730

    This should do it for you: RewriteEngine on...

    This should do it for you:


    RewriteEngine on
    RewriteRule ^contact/?$ contact.php
  14. Replies
    6
    Views
    2,325

    Using the following should be better. Then, if...

    Using the following should be better. Then, if you need the absolute location, use realpath.


    $file = glob('images/image.{gif,jpg,png}', GLOB_BRACE);
  15. Thread: logout error

    by techietim
    Replies
    2
    Views
    1,376

    Resolved You need to call session_start(); before you try...

    You need to call session_start(); before you try to do anything.
  16. Thread: Equals

    by techietim
    Replies
    2
    Views
    1,265

    http://www.php.net/manual/en/language.operators.co...

    http://www.php.net/manual/en/language.operators.comparison.php
  17. Replies
    3
    Views
    1,971

    $files = glob('*.*'); $files =...

    $files = glob('*.*');
    $files = array_filter($files, 'is_file');

    if(count($files))
    {
    echo '<ul>';
    }
    foreach($files as $file)
    {
    echo '<li>' . basename($file) . '</li>';
  18. Replies
    4
    Views
    1,505

    go with this then:

    go with this then:


    <li class="amenities"><u>Amenities</u> (may vary by season):
    <?php
    $arr = get_the_category_excludeCat();
    $arr_length = count($arr);
    for($i = 0; $i < $arr_length; $i++)
    {...
  19. Replies
    4
    Views
    1,505

    Use explode instead.

    Use explode instead.
  20. Thread: -> Huh?

    by techietim
    Replies
    10
    Views
    2,708

    As gurmeet said, it is used for object oriented...

    As gurmeet said, it is used for object oriented programming in PHP.

    As opposed to Java, which uses the . for accessing non-static and static members of an object or class, PHP uses -> for...
  21. Replies
    3
    Views
    3,297

    Remove the space in [NC, L].

    Remove the space in [NC, L].
  22. Thread: Array Value

    by techietim
    Replies
    7
    Views
    2,459

    EDIT: Sorry. The question was badly phrased. ...

    EDIT:
    Sorry. The question was badly phrased.

    I just copied and pasted that exact code and ran it on my computer, and it's showing me 0.0023412093. Make sure you're running PHP 5 <=, as there...
  23. Replies
    3
    Views
    2,430

    Just use escape()?

    Just use escape()?
  24. Replies
    1
    Views
    1,194

    Resolved Currently, PHP only has support for type hinting...

    Currently, PHP only has support for type hinting Arrays and Object. You can implement this for regular data types by using SPL Type classes.

    There is also an active RFC document here:...
  25. Replies
    5
    Views
    2,276

    You are placing this in the /media folder,...

    You are placing this in the /media folder, correct? If you're not, that could be why it's not working.
Results 1 to 25 of 228
Page 1 of 10 1 2 3 4