Drupal入门API

<?php
   chdir('/var/www/drupal');
   require_once './includes/bootstrap.inc';
   drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

   $nid=1;
   $node=node_load($nid);
   print_r($node);
   $body=$node->body;
   $body="我想修改的内容放这里,或者使用正则表达式";
   $node->body=$body;
   node_save($node);
   $node=NULL;

 

  $nodesql=

      "SELECT node.nid AS nid,node.changed AS node_changed FROM drup_node node ORDER BY ode_changed DESC";
  $noderesult=db_query_range($nodesql,10,100);
  while($rows = db_fetch_object($noderesult)){
       print_r($rows);
  }
  $noderesult=NULL;

 

  print views_embed_view("test_view");
?>

 

你可能感兴趣的:(PHP,正则表达式)