www.webdeveloper.com

Search:

Type: Posts; User: andre4s_y

Page 1 of 11 1 2 3 4

Search: Search took 0.03 seconds.

  1. What is your definition of mobile users? - if...

    What is your definition of mobile users?
    - if you mean users with specific device, such as iphone, do User Agent detection and redirect user using header location.
    - if you mean users with lower...
  2. Replies
    3
    Views
    2,270

    There is an alternative for run php on cron: -...

    There is an alternative for run php on cron:
    - call the site page using wget or curl.
    Example:


    0 8 * * * /usr/bin/wget "http://127.0.0.1/cron.php" > /dev/null 2>&1
    0 8 * * * /usr/bin/curl -s...
  3. Thread: ASP tags

    by andre4s_y
    Replies
    4
    Views
    2,013

    If you are talking about PHP code: ASP tags can...

    If you are talking about PHP code:
    ASP tags can still be enabled via php.ini directive (by default: disable).
    Link: ASP tags directive on PHP Manual

    Why you need ASP tags on PHP code?...
  4. Replies
    10
    Views
    1,880

    Try this:

    Try this:


    <?php
    $dbCyrillicWord="тест";
    $userProvidedCyrillicWord="цастестvас";
    $userProvidedCyrillicWord="цастеvас";
    function compareTwoString($dbCyrillicWord,$userProvidedCyrillicWord)
    {...
  5. Replies
    10
    Views
    1,880

    No information on why it does not work? If you...

    No information on why it does not work?
    If you run:


    <?php
    $test="teУst";
    echo $test;
    ?>

    You will get
  6. Replies
    10
    Views
    1,880

    I never try it, but maybe something like this: ...

    I never try it, but maybe something like this:


    <?php
    $test="teУst";
    @preg_match("#[\x{0400}-\x{052F}]+#u",$test,$test);
    #according wikipedia: The Cyrillic blocks In Unicode extend from U+0400...
  7. Replies
    4
    Views
    1,068

    Want to try a little regex?

    Want to try a little regex?


    <?php
    @preg_match("#(\d+)\.png$#",$adImageURL,$adImageURL); #match to digit before .png
    echo $adImageURL[1];
    ?>
  8. Replies
    2
    Views
    1,128

    Solved

    Yes.. i did not realized that.. :p
    Thank you so much..
  9. Replies
    2
    Views
    1,128

    [RESOLVED] Help JavaScript Regex

    Help me please..
    Why this code does not works :


    var pattern = new RegExp("\s\[x\]$");
    var gototext = document.getElementById(index).text.replace(pattern,"");

    while this code works :
  10. Replies
    3
    Views
    665

    Yes, suggestion : why don't you use form, if you...

    Yes, suggestion :
    why don't you use form, if you have code readable difficulity?


    <form action="bookview.php" method="get">
    <?php

    echo '<input type="hidden" name="id"...
  11. Replies
    9
    Views
    1,211

    Do not forget : //also do not forget to...

    Do not forget :


    //also do not forget to close mysql connection
    //after header('Location: blabla.htm');
    exit;
  12. Replies
    8
    Views
    8,652

    Ok, i understand. It is better not to trust...

    Ok, i understand.
    It is better not to trust user's input for file name. Any user can rename php file into .doc file and this is not right. In order to append file extension in your new file name...
  13. Replies
    8
    Views
    8,652

    $_FILES['file']['type'] is Mime Type, not file...

    $_FILES['file']['type'] is Mime Type, not file extension! So, you can not use :


    $uniq = gmdate( 'dmYHis' ) . '_' . md5_file( $_FILES['file']['tmp_name'] ) . $_FILES['file']['type'];

    List of...
  14. Replies
    8
    Views
    8,652

    something like this, maybe? /* without...

    something like this, maybe?


    /*
    without fileinfo
    */
    if ( is_uploaded_file( $_FILES['file']['tmp_name'] ) && $_FILES['file']['type'] == "application/pdf" )
    {
    $uniq = gmdate( 'dmYHis' ) ....
  15. Replies
    8
    Views
    8,652

    1st : If user's browser provided the file type...

    1st :
    If user's browser provided the file type information, you can access it in $_FILES['type'] (in your example is : $_FILES['file']['type'])when proccessing upload. Or use fileinfo extension. But...
  16. include("../UncleDirectory/cousin.php") is up...

    include("../UncleDirectory/cousin.php")
    is up one directory (../) from your main script's location.
    Then :

    include("./UncleDirectory/cousin.php")
    UncleDirectory is in the same directory (./)...
  17. Replies
    8
    Views
    845

    Very interesting.... Although the problem has...

    Very interesting.... Although the problem has been solved, this case is worth for study regex.
    One question, how to make it recursive?
    For example :


    $text = "Hello || ]] test || this [[ab] ||...
  18. Replies
    4
    Views
    1,120

    Maybe try this code : if you mind you change...

    Maybe try this code :
    if you mind you change your borrowed function from php.net


    preg_match_all('/' . preg_quote($start,'/') . '(.+?)'. preg_quote($end, '/').'/si', $string, $m);

    The main...
  19. Thank you for your response. Okay.. i try to post...

    Thank you for your response. Okay.. i try to post and explain the part of the file(not all, too big).


    <?php
    //...
    /*
    Filename = index.php
    To make file access this part of file :...
  20. How to access a php file that still in looping waiting for database

    I have a file (for example : play.php). That file has a duty to control an application (OpenOffice Impress->SlideShow). Control means to open(run slideshow) and close the application. When i try to...
  21. Replies
    7
    Views
    954

    I was wrong. Do not use \W in my first example,...

    I was wrong.
    Do not use \W in my first example, because it will match also with : #~!@#$&#37;^&*() and other else(which belong to your message), not only the vertical whitespace.
  22. Replies
    7
    Views
    954

    try this : ...

    try this :


    preg_match_all('#read\W+(.*?)#is', $tes_string, $matches);

    Pattern : read[non-wordcharacter](capture subpattern)
    or


    preg_match_all('#read\v+(.*?)#is', $tes_string, $matches);
  23. First : why do you use psexec command to use tool...

    First : why do you use psexec command to use tool in your own machine? Have try it without psexec?
    Second : if you insist use it, have you check the permission? xp or vista permission..
    Third :...
  24. Replies
    7
    Views
    954

    Try to use \v for vertical whitespace character...

    Try to use \v for vertical whitespace character (since PHP 5.2.4).
    Or using pattern : read[nonwordcharacter]yourmessage.
    Non word character is : \W or you can customize it.
  25. The other solution is : tell php which separator...

    The other solution is : tell php which separator is used to parse input URL into variables.
    set arg_separator.input in php.ini.
Results 1 to 25 of 258
Page 1 of 11 1 2 3 4
HTML5 Development Center



Recent Articles