zend-framework

Zend Framework Lucene Boolean / “Google”-like search

不问归期 提交于 2019-12-11 07:46:38
问题 I'm working on the application at http://demos.zatechcorp.com/codeigniter/ In its current incarnation running on my machine, I loaded the ZendFramework inside Codeigniter, and generated an index, like this: // ... Some code that loads all the markets foreach ($markets as $market) { $doc = new Zend_Search_Lucene_Document(); // Id for retrieval $doc->addField(Zend_Search_Lucene_Field::UnIndexed('id', $market->id)); // Store document URL to identify it in search result. $doc->addField(Zend

pass a variable in the url in zend

浪尽此生 提交于 2019-12-11 07:36:51
问题 I am not able to a pass a variable value in the URL in Zend. echo '<a href="/page/page-info/page_id/"' .$this->hidden_page_id. '"/">Back</a>'; if I simple echo $this->hidden_page_id I get the value on the above page. But When I pass it above through a link it does not show the value. Do I have to store it in a session or something? 回答1: What you get when do a var_dump? var_dump($this->hidden_page_id); An advice, use View Helpers: echo '<a href="' . $this->url(array('controller' => 'page',

Ubuntu Zend Framework cli securityCheck Error

安稳与你 提交于 2019-12-11 07:36:41
问题 I followed all the instructions. I am on Ubuntu 10.10. using Zend Server Ce. In my .bashrc I have ld_library_path, zend framework library, etc. I can run zf, but its giving an error: Fatal error: Uncaught exception 'Zend_Exception' with message 'Security check: Illegal character in filename' in /usr/local/zend/share/ZendFramework/library/Zend/Loader.php:303 Stack trace: #0 /usr/local/zend/share/ZendFramework/library/Zend/Loader.php(128): Zend_Loader::_securityCheck('Zend/Tool/Proje...') #1

Payment Method Module doesn't show in Store

血红的双手。 提交于 2019-12-11 07:19:25
问题 Hi I developed a magento payment module, It shows in Admin area but not in Frontend Store Check out page. folder structure app/local/Company/Cashondelivery/Block app/local/Company/Cashondelivery/Model app/local/Company/Cashondelivery/controller app/local/Company/Cashondelivery/etc app/local/Company/Cashondelivery/helpers The etc/config.xml <?xml version="1.0"?> <config> <modules> <Company_Cashondelivery> <!-- declare module's version information for database updates --> <version>0.1.0<

How to get column value without decimal in MYSQL

心不动则不痛 提交于 2019-12-11 07:05:54
问题 I have two column in my mysql table A and B and I am fetching records like this: select (A/B) from table But problem is that Above query providing vales something like this: 12.00 3.4 78.9 But I want to get result like this: 12 3 78 Which MySQL function I will use for this ?? Thanks 回答1: If you want 78.9 to be 78 then SELECT Floor(A/B) FROM table If you want 78.9 to be 79 then SELECT Ceiling(A/B) FROM table 回答2: Just ROUND your result: SELECT ROUND(A/B, 0) FROM table You can also combine

PHP pdf 2 text problem

痴心易碎 提交于 2019-12-11 07:04:10
问题 I'm using Zend_Pdf library for extract text from pdf and I have some problems... <?php set_include_path (__DIR__ . '\data'); require_once 'Zend/Pdf.php'; // Load PDF document from a file. $fileName = 'carbsarticle.pdf'; $pdf = new Zend_Pdf($fileName); $pdf = Zend_Pdf::parse($pdf); var_dump($pdf); Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'File is not a PDF.' I tried to download other pdf file, but the error is the same .. EDIT: try { $pdf2 = Zend_Pdf::load('test.pdf');

Accessing youtube services from php

本秂侑毒 提交于 2019-12-11 07:01:04
问题 I am completely new to php. I am trying to build a system to upload videos to youtube and preserve their URL. Another flash application later combines them. I am clearing the target so that i can be assured that the library can perform these tasks. 1) upload on a default channel 2) get video url 3) download video for offline viewing I found the zend library which is used with php by googling. But facing a lot problem. I am using WAMP. I copied the zend library folder to "C:\wamp\www\zend" and

ZF2 Remove column quotes in query

╄→гoц情女王★ 提交于 2019-12-11 06:52:05
问题 Since a while I am trying to remove the quotes of my mysql query in a ZF2 application. I need to remove the quotes to make this query works, testing the query over command line succeeded by removing the quotes around GEODIST(). $adapter = $serviceLocator->get('SphinxSearch\Db\Adapter\Adapter'); $sql = new Sql($adapter); $select = new Select; $select ->columns(array('*', 'distance' => 'GEODIST(23.3556740442177, 2.9525189115381, latitude, longitude)')) ->from('table_name') ->where(array(

Zend Db / Mysql - Insert with Select

时光毁灭记忆、已成空白 提交于 2019-12-11 06:46:54
问题 I am trying to find the best way to do this, better if I could use Zend_db_table. Basically I am inserting a row and one of the values comes from the same DB, this value changes constantly so I need to be sure the data inserted is valid. I can't query first for the value and then append it to the insert query because between the two queries the data could change and I end up inserting the wrong value. I wonder if LOCKING the table is the way to go or if Zend has a shortcut. I'm using Mysql.

Zend_Db: Adapter suddenly is null!

邮差的信 提交于 2019-12-11 06:46:38
问题 I'm using Zend_Db in one of my projects. Now I have the problem, that suddenly during the code execution, the variable $_db in Zend_Db_Adapter_Abstract is null. (shown by var_dump($this); in my DbTable_xx class). It seems like the adapter is set to null somewhere during the script execution. How can that happen? Unfortunately the project is too complex to post some code here... I'm getting this error (while executing the find($primary) method on Zend_Db_Adapter_Abstract): Fatal error: Call to