
phpchamps
Members-
Posts
153 -
Joined
-
Last visited
Never
About phpchamps
- Birthday 03/20/1984
Profile Information
-
Gender
Male
-
Location
India
Contact Methods
- Yahoo
phpchamps's Achievements

Newbie (1/5)
0
Reputation
-
if(mysql_num_rows($check_e) =0) there should be == (comparison operator ) not single = (assignment operator)
-
I m trying to create new module in socialengine but when i run.. i get this error exception 'Engine_Loader_Exception' with message 'Could not load class: Managehomepagebanner_Api_Core' in E:\xampp\htdocs\socialengine\application\libraries\Engine\Loader.php:150 Stack trace: #0 E:\xampp\htdocs\socialengine\application\libraries\Engine\Loader.php(181): Engine_Loader::loadClass('Managehomepageb...') #1 E:\xampp\htdocs\socialengine\application\libraries\Engine\Api.php(296): Engine_Loader->load('Managehomepageb...') #2 E:\xampp\htdocs\socialengine\application\libraries\Engine\Api.php(249): Engine_Api->load('managehomepageb...', 'api', 'core') #3 [internal function]: Engine_Api->__call('managehomepageb...', Array) #4 E:\xampp\htdocs\socialengine\application\modules\ManageHomepageBanner\controllers\AdminManageController.php(29): Engine_Api->managehomepagebanner() #5 E:\xampp\htdocs\socialengine\application\libraries\Zend\Controller\Action.php(513): ManageHomepageBanner_AdminManageController->indexAction() #6 E:\xampp\htdocs\socialengine\application\libraries\Zend\Controller\Dispatcher\Standard.php(289): Zend_Controller_Action->dispatch('indexAction') #7 E:\xampp\htdocs\socialengine\application\libraries\Zend\Controller\Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #8 E:\xampp\htdocs\socialengine\application\modules\Core\Bootstrap.php(89): Zend_Controller_Front->dispatch() #9 E:\xampp\htdocs\socialengine\application\libraries\Engine\Application.php(99): Core_Bootstrap->run() #10 E:\xampp\htdocs\socialengine\application\index.php(183): Engine_Application->run() #11 E:\xampp\htdocs\socialengine\index.php(15): include('E:\xampp\htdocs...') #12 {main} Any help is appreciated
-
Below is the code for the PNG... <?php header("Content-type: image/png"); // CONTENT TYPE OF OUTPUT FILE $string = 'phpchamps'; // STRING TO BE PRINTED ON THE IMAGE $im = imagecreatefrompng("button1.png"); // BACKGROUND IMAGE ON WHICH TEXT TO BE PRINTEND $orange = imagecolorallocate($im, 0, 0, 60); // COLOR OF THE TEXT $px = (imagesx($im) - 9 * strlen($string)) / 2; // MARGIN TO BE SET imagestring($im, 9, $px, 29, $string, $orange); imagepng($im); imagedestroy($im); ?>
-
There is literally no reason why this does not work.
phpchamps replied to turkman's topic in Javascript Help
I dont think there is anything on the js side. In which format you are returning the data from the w.php file... can you share the database schema and w.php file also.. -
please post the full code.
-
If the return_var argument is present along with the output argument, then the return status of the executed command will be written to this variable. I would suggest you to use ftp commands of php to copy files to different server. http://php.net/manual/en/book.ftp.php
-
Below function will check whether its a ajax request or nt.. function isAjax() {return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'));}
-
Hey Natasha, As you are using the exec command the third parameter of exec command is return_var which will return the status of the execture command. I think you should check for the return status and if status is true then you can continue the loop or else break it. Hope it helps. Thanks.
-
did you check the permission ???
-
Hops this helps : <?php $db = mysql_connect('localhost','root','') or die("Database error"); mysql_select_db('test', $db); $result = mysql_query("set names 'utf8'"); $query = "select * from test"; $result = mysql_query($query); $returnArr = array(); while($row = mysql_fetch_array($result)){ $returnArr[$row['id_1']] = $row['id_2']; } $searchArr = 100; // Enter the key to be searched if(array_key_exists($searchArr,$returnArr)){ // This will check the whether key exists or not echo "Available Value Is :". $returnArr[$searchArr]; }else{ echo "Key Doesnt Exists"; } ?>
-
Crontab has a specific format. below is the format... Min Hour Day/month Month Day/week Description 30 0 1 1,6,12 * 00:30 Hrs on 1st of Jan, June & Dec. 0 20 * 10 1-5 8.00 PM every weekday (Mon-Fri) only in Oct. I think what you require is:- Min Hour Day/month Month Day/week Description /20 00-06 * * 1-7 [td][/td] Hope this helps....
-
hope this helps you http://lists.mysql.com/mysql/182361
-
i dont know why ur didnt work.. just modified ur script as i dont have DB and it worked for me.. find attached screenshot <?phpclass CSVExport{public function __construct(){}public function exportCSV(){ $result = array(array('name' => 'atul', 'age' => '26'), array('name' => 'viral', 'age' => '34'), array('name' => 'mahesh', 'age' => '44')); $fname = 'CSVFile.csv'; $headers = array(); $rowArray = array(); $numFields = 2; for ($i = 0; $i < $numFields; $i++) { $headers[$i]['name'] = $result[$i]['name']; $headers[$i]['age'] = $result[$i]['age']; } $fp = fopen($fname, 'w'); if ($fp && $result) { header('Content-Type: application/csv'); header('Content-Disposition: inline; filename='.$fname); fputcsv($fp, $headers); while ($thisrow = mysql_fetch_row($result)) { fputcsv($fp, $thisrow); } readfile($fname); fclose($fp); }die;}}$obj = new CSVExport();$obj->exportCSV();?> [attachment deleted by admin]
-
The best book for this is PHP|arch - Guide to php security... http://www.phparch.com/books/phparchitects-guide-to-php-security/
-
why 777??? write permission to others also ????? give 775 or 755 .....