zend-framework

File upload with jqgrid in PHP

狂风中的少年 提交于 2019-12-30 03:35:07
问题 I am trying to implement file upload with jqgrid (in a Zend Framework project). jqgrid allows you to create an input field of type "file" but does not enable ENCTYPE=“multipart/form-data”. The creator recommends using another plugin to handle file uploads, specifically Ajax File Upload. He says to initialize it using the onInitializeForm() method but exactly how to do this is not clear to me. He says, "Also as I suggest you can use Ajax file upload plugin and intialize it only once in

How to access Amazon s3 private bucket object through Zend_Service_Amazon_S3

穿精又带淫゛_ 提交于 2019-12-30 03:33:08
问题 I have created a bucket on the amazon s3 and I kept some images in this bucket inside a folder. All the images are private and I am using Zend_Service_Amazon_S3 class of Zend. Please let me know how can I access the private images. Thanks, Pravin 回答1: You can do this task by making private url Like this public function get_s3_signed_url($bucket, $resource, $AWS_S3_KEY, $AWS_s3_secret_key, $expire_seconds) { $expires = time()+$expire_seconds; // S3 Signed URL creation $string_to_sign = "GET\n

How to use GROUP_CONCAT with Zend Framework?

本秂侑毒 提交于 2019-12-30 03:31:05
问题 Assume that I have a table : students ______________________________________________________ |id | name | school | class | ______________________________________________________ | 1 | John | ABC | C1 | | 2 | Jack | ABC | C1 | | 3 | Anna | ABC | C1 | | 4 | Peter | DEF | D1 | | 5 | Alex | ABC | C2 | | 6 | Bryan | ABC | C2 | | 7 | David | ABC | C2 | | 8 | Cristian | DEF | D1 | _______________________________________________________ Using this query : SELECT a.class,GROUP_CONCAT(a.name) as names

persisted login with Zend_Session::rememberMe

空扰寡人 提交于 2019-12-30 02:01:16
问题 I'm using Zend_Session to manage my user sessions, and I was looking to implement a "Remember Me" option in my application to keep users logged in for 2 weeks or so. I've noticed that Zend_Session already has a built-in function called Zend_Session::rememberMe , however I'm not sure if that function logic is correct to use as a persisted login. Essentially, the rememberMe function just extend the active session expiration date, which means if the user use the remember me option, he'll stayed

Populating a FilteringSelect datastore from an onChange event

女生的网名这么多〃 提交于 2019-12-29 09:11:13
问题 I'm trying to bind an onChange event of one FilteringSelect to populate another FilteringSelect . // View dojo.addOnLoad(function () { dojo.connect(dijit.byId('filterselect1'), 'onChange', function () { dijit.byId('filterselect2').store = new dojo.data.ItemFileReadStore( { url: "/test/autocomplete/id/" + dijit.byId("filterselect1").value } ); }); }); The JSON is generated from what I can tell correctly from a Zend Action Controller using a autoCompleteDojo helper. // Action Controller public

zend modules models

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-29 09:08:30
问题 My application setup with 2 modules admin and default I test the controller which works fine on modules but the models doesnt work I created a model application\modules\admin\models\User.php <?php class Admin_Model_User{ } inside the controller $user = new Admin_Model_User(); Fatal error: Class 'Admin_Model_User' not found 回答1: Essentially, you need 2 lines in the application.ini file; resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.modules[] = "" Then, for

Is a good idea have a BaseController and make all controllers extend that class?

故事扮演 提交于 2019-12-29 08:18:06
问题 I need some common behaviors in all controllers. Is a good idea have a BaseController and make all controllers extend that class? If so, What is the correct way to avoid the Fatal error: Class 'BaseController' not found error. 回答1: It's certainly a common approach. But an article by ZF project lead Matthew Weier O'Phinney explains how action-helpers can provide the same benefits with more flexibility. In particular, a common base controller often becomes a dumping ground for functionality

Action View Helper in Zend - Work around?

无人久伴 提交于 2019-12-29 06:15:55
问题 I'm working on building up an interface that I want to function as a "tabbed browsing" sort of function. Each of these tabs has already been written as an action and the tabbed interface works fine as links to the individual tabs. I decided to try writing the "index" page for this controller - putting the content of all the tabs into hidden divs and swapping between them with jQuery, but once I started to use the action view helper - I ran into a lot of people saying that its bad practice.

Action View Helper in Zend - Work around?

送分小仙女□ 提交于 2019-12-29 06:15:06
问题 I'm working on building up an interface that I want to function as a "tabbed browsing" sort of function. Each of these tabs has already been written as an action and the tabbed interface works fine as links to the individual tabs. I decided to try writing the "index" page for this controller - putting the content of all the tabs into hidden divs and swapping between them with jQuery, but once I started to use the action view helper - I ran into a lot of people saying that its bad practice.

Wamp Server: Multiple Virtual Hosts are not working on Windows

安稳与你 提交于 2019-12-29 04:50:26
问题 I have two virtual hosts on windows(for example: test1.dev and test2.dev). But it always load content of test1.dev for both virtual hosts. Following are my files: hosts: 127.0.0.1 localhost 127.0.0.1 test1.dev 127.0.0.1 test2.dev httpd.conf: <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> Include "c:/wamp/alias/*" <VirtualHost 127.0.0.1> ServerName test1.dev DocumentRoot "C:\wamp\www\test1\public" </VirtualHost> <VirtualHost 127.0.0.1> ServerName