kohana

PHP Chart Library Solution [closed]

亡梦爱人 提交于 2019-11-30 19:08:54
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Good day. I am a newbie to PHP framework, and I know a little about CI. Recently, i plan to start my new practice project with Kohana.

PHPUnit - test MVC controller with $_POST variable

陌路散爱 提交于 2019-11-30 15:12:44
问题 I'm starting work with PHPUnit with Kohana. My application have many controllers which simply takes data from some form, validates and inserts/updates/deletes into/-/from database. How should I write a test cases for that. I know that if I want to test a function I write data provider function and just compare returned value with the expected one. But my input data (data from forms) is being passed in $_POST variable. How should I test this? And after that, should I check if inserted data is

PHPUnit - test MVC controller with $_POST variable

柔情痞子 提交于 2019-11-30 13:57:54
I'm starting work with PHPUnit with Kohana. My application have many controllers which simply takes data from some form, validates and inserts/updates/deletes into/-/from database. How should I write a test cases for that. I know that if I want to test a function I write data provider function and just compare returned value with the expected one. But my input data (data from forms) is being passed in $_POST variable. How should I test this? And after that, should I check if inserted data is really in database? Please give my some guidlines for that type of tests or links to some examples

Searching for a Kohana Beginner's Tutorial for PHP [closed]

試著忘記壹切 提交于 2019-11-30 10:04:44
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 8 years ago . I am going to try to build a PHP website using a framework for the first time, and after some research here and there, I've decided to try to use Kohana

How to set up .htaccess for Kohana correctly, so that there is no ugly “index.php/” in the URL?

眉间皱痕 提交于 2019-11-30 05:18:54
问题 After 2 hours now I couldn't get it right. The Kohana installation is accessible directly under my domain, i.e. "http://something.org/" Instead of http://something.org/index.php/welcomde/index I want to have URLs like http://something.org/welcome/index My .htaccess is messed up completely. It's actually the standard example.htaccess that came with the download. It's almost useless. On the kohana page is a tutorial "how to remove the index.php". It's really useless as well, since it will not

Searching for a Kohana Beginner's Tutorial for PHP [closed]

筅森魡賤 提交于 2019-11-29 18:42:11
I am going to try to build a PHP website using a framework for the first time, and after some research here and there, I've decided to try to use Kohana I downloaded the source from their website, and ran the downloaded stuff on my web server, and was then greeted with a 'Welcome to Kohana!' page, and nothing more... I've tried to find some beginner tutorials on the web as regard this particular framework, but to my surprise, came up with almost nothing ( only this one , but it's not a great deal of help ) I am not new to PHP and neither am I new to the MVC concept, but I am very new to PHP

Favourite Kohana Tips & Features? [closed]

陌路散爱 提交于 2019-11-29 18:35:46
Inspired from the other community wikis, I'm interested in hearing about the lesser known Kohana tips, tricks and features. Please, include only one tip per answer. Add Kohana versions if necessary. This is a community wiki . Kemo Generating Form::select() options from database result Kohana 3.1 and 3.0 $options = ORM::factory('model') ->order_by('title','ASC') ->find_all() ->as_array('id','title'); $select = Form::select('name', $options); It should be noted this is not restricted to the ORM and can be used on all database results (they all support as_array). See the database results

Kohana - controller specific .htaccess

情到浓时终转凉″ 提交于 2019-11-29 17:01:58
I'm trying to set some htaccess rules for a specific Kohana controller. Basically its to do with form uploads. The majority of the site doesn't want to allow for large uploads so the php.ini will remain with the recommended settings. However in one place a large file upload is required. I have the following options to add in my root .htaccess: php_value max_input_time 60000 php_value post_max_size "1GB" php_value upload_max_filesize "1GB" php_value memory_limit "128MB" But I don't know what to do to make it apply just for one controller (i.e. http://www.mysite.com/massiveupload ). Any help

help on building a basic php search engine

亡梦爱人 提交于 2019-11-29 15:33:14
i looked for tutorials everywhere but just can't seem to get a good one... a search page with pagination, column header sorting, and multiple filtering(filters are in checkboxes) the problem: had pagination working, had sorting working, but can't get them to work together. add to that getting the filters working with a paginated and sorted resultset i want to make this work with php alone and with GET form methods alone (javascript comes in later, I want to apply progressive enhancement on this one) i have no idea how to make the three functionalities(pagination, sorting and filtering) work

multi insert in kohana orm3

Deadly 提交于 2019-11-29 12:02:52
In my application i have a loop that executes about 1000 times, inside it i'm creating object and saving it. This is the part of application where i populate my database with data. In common this looks like this: foreach(...){ ... try{ $object = new Model_Whatever; $object->whatever=$whatever; $object->save();} catch(Exception $e){ ...} } } This produces 1000 of INSERT queries. Is it possible to, in some way, made kohana produce multi inserts. Split this into 10 inserts with 100 data sets in each. Is it possible and if yes that what is the way doing so? Whilst the Kohana ORM doesn't support