CodeIgniter with PHPABTest

Asked
Active3 hr before
Viewed126 times

4 Answers

codeigniter
90%

You might want to check your PHP settings. You'll find a setting called output_buffer in your php.ini file that might be set to Off. , Reducing the weight of our footer , What made the Amiga "Genlock-able"? , Podcast 394: what if you could invest in your favorite developer?

Exert from php.ini:

;
Output buffering allows you to send header lines(including cookies) even;
after you send body content, at the price of slowing PHP 's output layer a;
bit.You can enable output buffering during runtime by calling the output;
buffering functions.You can also enable output buffering
for all files by
;
setting this directive to On.If you wish to limit the size of the buffer;
to a certain size - you can use a maximum number of bytes instead of 'On', as;
a value
for this directive(e.g., output_buffering = 4096).
output_buffering = 4096
88%

Я создаю сайт CodeIgniter и пытаюсь использовать php ABTest в контроллере.,Я сохранил phpabtest.php файл как phpabtest_helper.php в папке "помощники" и загрузил его в контроллер. Он инициализируется в логике PHP как таковой:,0Это плохая практика именовать таблицы реляционной базы данных, используя пространство имен, разделенных точками,Выполнить из php.ini:

Я сохранил phpabtest.php файл как phpabtest_helper.php в папке "помощники" и загрузил его в контроллер. Он инициализируется в логике PHP как таковой:

public
function view($name) {
   $this - > load - > helper('phpab');
   $testpopup = new phpab('test_popup');
   $testpopup - > add_variation("popup");

   $type = $this - > Types - > getTypeBySlug($name);
   $data['type'] = $type;
   $data['items'] = $this - > Items - > getItemsByType($type - > id);

   $alltypes = $this - > Types - > getAll();
   $headerdata['alltypes'] = $alltypes;
   $headerdata['current'] = $type - > id;
   $this - > load - > view('header');
   $this - > load - > view('typeheader', $headerdata);
   if ($testpopup - > get_user_segment() == 'popup') {
      $this - > load - > view('type_new', $data);
   } else {
      $this - > load - > view('type', $data);
   }
   $this - > load - > view('footer');
load more v
72%

我正在建立一个codeigniter站点,并试图在控制器中使用php ABTest。我将phpabtest.php file保存为“helpers”文件夹中的phpabtest_helper.php,并将其加载到控制器中。它在php逻辑中初始化如下:, 原文 标签 php codeigniter ob-start , php - CodeIgniter中使用PostgreSQL数据库时的空白页 ,关于php - 使用PHPABTest的CodeIgniter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17358218/

我正在建立一个codeigniter站点,并试图在控制器中使用php ABTest
我将phpabtest.php file保存为“helpers”文件夹中的phpabtest_helper.php,并将其加载到控制器中。它在php逻辑中初始化如下:

public
function view($name) {
   $this - > load - > helper('phpab');
   $testpopup = new phpab('test_popup');
   $testpopup - > add_variation("popup");

   $type = $this - > Types - > getTypeBySlug($name);
   $data['type'] = $type;
   $data['items'] = $this - > Items - > getItemsByType($type - > id);

   $alltypes = $this - > Types - > getAll();
   $headerdata['alltypes'] = $alltypes;
   $headerdata['current'] = $type - > id;
   $this - > load - > view('header');
   $this - > load - > view('typeheader', $headerdata);
   if ($testpopup - > get_user_segment() == 'popup') {
      $this - > load - > view('type_new', $data);
   } else {
      $this - > load - > view('type', $data);
   }
   $this - > load - > view('footer');
load more v
65%

我已经在phpunit.xml中定义了需要按顺序执行的测试文件列表。
根据http://phpunit.de/manual/3.7/en/organizing-tests.html#organizing-tests.xml-configuration的规定,测试用例的顺序可以定义为:

<phpunit>
   <testsuites>
      <testsuite name="Object_Freezer">
         <file>Tests/Freezer/HashGenerator/NonRecursiveSHA1Test.php</file>
         <file>Tests/Freezer/IdGenerator/UUIDTest.php</file>
         <file>Tests/Freezer/UtilTest.php</file>
         <file>Tests/FreezerTest.php</file>
         <file>Tests/Freezer/StorageTest.php</file>
         <file>Tests/Freezer/Storage/CouchDB/WithLazyLoadTest.php</file>
         <file>Tests/Freezer/Storage/CouchDB/WithoutLazyLoadTest.php</file>
      </testsuite>
   </testsuites>
</phpunit>
load more v