Change thrift require_once to include_once
authorMark Slee <mcslee@apache.org>
Mon, 25 Sep 2006 21:32:05 +0000 (21:32 +0000)
committerMark Slee <mcslee@apache.org>
Mon, 25 Sep 2006 21:32:05 +0000 (21:32 +0000)
Summary: As per Lucas' request

Reviewed By: lucas

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664803 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_php_generator.cc
lib/php/src/protocol/TBinaryProtocol.php
lib/php/src/protocol/TProtocol.php
lib/php/src/transport/TSocketPool.php

index bfbec9c..de816dc 100644 (file)
@@ -30,7 +30,7 @@ void t_php_generator::init_generator(t_program* tprogram) {
  */
 string t_php_generator::php_includes() {
   return
-    string("require_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';\n\n");
+    string("include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';\n\n");
 }
 
 /**
@@ -341,7 +341,7 @@ void t_php_generator::generate_service(t_service* tservice) {
     php_includes();
 
   f_service_ <<
-    "require_once $GLOBALS['THRIFT_ROOT'].'/packages/" << program_name_ << "/" << program_name_ << "_types.php';" << endl << endl;
+    "include_once $GLOBALS['THRIFT_ROOT'].'/packages/" << program_name_ << "/" << program_name_ << "_types.php';" << endl << endl;
 
   // Generate the three main parts of the service (well, two for now in PHP)
   generate_service_interface(tservice);
index 4123f5f..dd4408f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /** For transport operations */
-require_once $GLOBALS['THRIFT_ROOT'].'/transport/TTransport.php';
+include_once $GLOBALS['THRIFT_ROOT'].'/transport/TTransport.php';
 
 /**
  * Binary implementation of the Thrift protocol.
index 6101f57..3d9c466 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * For Type Constants
  */
-require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TType.php';
+include_once $GLOBALS['THRIFT_ROOT'].'/protocol/TType.php';
 
 
 /**
index 58f237a..1bb2e49 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /** Inherits from Socket */
-require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php';
+include_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php';
 
 /**
  * This library makes use of APC cache to make hosts as down in a web