ignace
Moderators-
Posts
6,457 -
Joined
-
Last visited
-
Days Won
26
Everything posted by ignace
-
nope that is not possible, a programming language fires off every command one by one and wait for it to complete and then continues to the next one, so when you call exec() it waits for the script to return a response, reacts on that response and on success continues to the next command. So when you exec() is fired and the perl script executes, you will have to sit out the whole ride until the perl script finishes or when the execution time times out, that however you can change, see: http://be.php.net/set_time_limit EDIT: it however seems to be possible, but you need to work with threats the same way a unix system works, nothing found on google yet about creating threads in php
-
use zip (http://be.php.net/manual/en/ref.zip.php) instead of zlib just iterate over the directory and add your files using the addFile() method, i suggest you write a recursive function for this, because you probably want subdirectories to be included. other compression methods can be found here: http://be.php.net/manual/en/refs.compression.php
-
[SOLVED] display zero in sql requete with php
ignace replied to prince198's topic in PHP Coding Help
if (!$calcul->week) { echo '0'; } -
add code tags to your code
-
have you tried the zend_services components from zend?, they also support SOAP and use an easier interface
-
well sorry for my behaviour but i really hate people who are storming the forums just to get quick answers without even trying to find it through google if you are not such a guy than i ow you my apologies i am also using the zend framework and actually the last place i use is a forum, because the answers are to slow my favourite resources are: http://www.zftutorials.com/ http://akrabat.com/ http://devzone.zend.com/
-
[SOLVED] Setting a static variable in a new class instance.
ignace replied to ridiculous's topic in PHP Coding Help
where someone uses new ClassName('internal variable value'); ? btw the below code you wrote is wrong, you executed twice the class constructor class Sample extends Default_Table { // additional class variables go here function Sample () { $this->tablename = 'sample'; $this->dbname = 'foobar'; $this->rows_per_page = 15; $this->fieldlist = array('column1', 'column2', 'column3', ...); $this->fieldlist['column1'] = array('pkey' => 'y'); echo 'constructor called'; } // end class constructor } // end class $s = new Sample(); // executes method Sample() $s->Sample(); // executes method Sample() again btw if you want that Default_Table defines your default behaviour you should declare it abstract abstract class Default_Table { protected $_cols; protected $_primary; } class TableName extends Default_Table {} for more on this subject, you should check the Table Data Gateway http://martinfowler.com/eaaCatalog/tableDataGateway.html -
use ajax, that way only a specific place on your website gets refreshed, without touching any other data http://www.ajax-tutorials.com/tutorial-list/resource/AJAX_Dynamic_Drop_Down_List_PHP_xajax/
-
[SOLVED] Setting a static variable in a new class instance.
ignace replied to ridiculous's topic in PHP Coding Help
http://www.php.net/manual/en/language.oop5.php it's apparently not that hard, even i could find it -
no we wrote php help for fun! this will do the trick: http://www.phpfreaks.com/tutorial/basic-pagination
-
If you would care to read a manual you would find that you can use Zend_Controller_Front plugins or use the init() or preDispatch() methods if you want specific behavior for a certain class. http://framework.zend.com/manual/en/ in case you wouldn't know where to find it!
-
Set static variables from outside a class...
ignace replied to ridiculous's topic in PHP Coding Help
if you would read a manual you would know! That same reason applies why you don't get any replies! Here, you get this one for free: class Example { protected static $_var; public static function test() { if (null === self::$_var) { ... -
[SOLVED] $captcha =& new captcha($CAPTCHA_CONFIG);
ignace replied to DataRater's topic in PHP Coding Help
$foo = 'bar'; $bar =& $foo; $bar = 'foo'; echo $foo; // returns foo $bar =& $foo $bar references $foo any changes made to $bar have effect on $foo -
@natbob php's metamorphic options? i thought rocks had metamorphic abilities or are you referring to the dynamic typing?
-
you forgot to pass the name to the second page, save the value of the name inside a hidden input field <input type="hidden" name="name" value="<?php echo $value;?>" />
-
only java currently supports to declare a class inside of a class, if you would like to do this in php you should look at class composition or class aggregation
-
is it possible to enable mod_rewrite when not allowed access to httpd.conf?
-
regex will lead you to the path of true enlightenment
-
a 9 iron, jar of peanut butter, and a moose... ???
-
use the proper db engine (e.g. innodb) and use references http://mirror.yandex.ru/mirrors/ftp.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html then when you delete the parent table all child tables will be also deleted or restricted, if all images within an album are deleted, then there is no problem, just show "no images available for this album"
-
two words: php manual
-
http://mediumexposure.com/techblog/smart-image-resizing-while-preserving-transparency-php-and-gd-library
-
yes, upload_tmp_dir should contain a value check the php manual if you are permitted to set the directive using ini_set() or .htaccess otherwise you will need to alter the php.ini
-
please post the code that is responsible for the write to file
-
http://be.php.net/features.safe-mode you are not allowed to read files from the directory