Fatal error: Maximum execution time of 60 seconds exceeded in WordPress

I go to this file: wp-includes/deprecated.php and find this line in (deprecated) wp_get_http()function:

 

@set_time_limit ( 60 );
Advertisements

To Remove tags removed wordpress

Friendly speaking while using the TinyMCE editor in wordpress this one is the issue it from go to visual to text its removing those tags

for overcome those issues  do not remove formatting just use this way

Write your <p> tags like this:

<p dir="ltr">something</p>

 

To prevent that, br tags can be written like this:

<br class="blank" />

Assign Related Products Programmatically In Magento 1.9

$product = Mage::getModel(‘catalog/product’)->loadByAttribute(‘sku’,$products);
$data = ”;
$relatedData = $product->getRelatedProductIds();
$insertIt = array();
if(count($relatedData) > 0){
foreach($relatedData as $relatedProduct)
{
$insertIt[$relatedProduct] = array(‘position’=>0,’qty’=>”) ;
}
}
$insertIt[$pr_id]= array(‘position’=>0,’qty’=>”);
try{
$product->setRelatedLinkData($insertIt)->save();
Mage::getSingleton(‘adminhtml/session’)->addSuccess(Mage::helper(‘adminhtml’)->__(‘Product assigned succesfully’));
}
catch(Exception $e)
{
Mage::getSingleton(‘adminhtml/session’)->addError(Mage::helper(‘adminhtml’)->__(‘There is problem with products, please refresh the page to see the result’));
}

Copy Directory/Folder Using PHP

<?php

copydir(“source”,”destination”);
echo “done”;

function copydir($source,$destination)
{
if(!is_dir($destination)){
$oldumask = umask(0);
mkdir($destination, 01777); // so you get the sticky bit set
umask($oldumask);
}
$dir_handle = @opendir($source) or die(“Unable to open”);
while ($file = readdir($dir_handle))
{
if($file!=”.” && $file!=”..” && !is_dir(“$source/$file”)) //if it is file
copy(“$source/$file”,”$destination/$file”);
if($file!=”.” && $file!=”..” && is_dir(“$source/$file”)) //if it is folder
copydir(“$source/$file”,”$destination/$file”);
}
closedir($dir_handle);
}