When creating a new project using zf create project myproject it will create a default project layout with an application.ini in the configs folder. Where can I change these default settings so that it generates (and uses) an XML file (application.xml)? I've looked at the documentation for Zend_Tool (http://framework.zend.com/manual/en/z...
Hi,
Currently I'm using the following code as part of sidebar code for Wordpress (the code works fine):
<ul class="linklist">
<?php $recentPosts = new WP_Query();
$recentPosts->query('showposts=12');
while ($recentPosts->have_posts()) : $recentPosts->the_post();
?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Link to...
Hi there,
I am new to PayPal API, and I'm having trouble calling SetExpressCheckout using CURL in PHP.
I have set everything correctly, as far as I'm concerned, but I kept getting an 81002 error "Method Specified is not Supported".
The code snippet is below. I got the CA Root certificates file from here.
<?php
$paypal_data = array(
...
Is it possible to have a function in PHP which takes 1 or more numbers and returns their sum ?
...
$_session['user_id']=4;
Where this values of session is saved.. means in some file??
where??
...
So I am using Limonade PHP which has a RESTful design which emulates PUT, POST, DELETE routes for create, update, delete.
I am trying to develop some form validation which is going well. The major problem I am facing though is how to return my filtered data (which has failed validation) back to repopulate the create or edit form.
How w...
i am going to "read" (video/big) files from server (shared environment) to clients (webbrowsers) via php and would like to know first if there is a way to reduce cpu and ram usage somehow (as i have those limited). thanks.
...
Hello,
I wanted to localizate some texts in my Zend Framework applicaiton.
There are some texts like:
Hello, I'm <a href="test.php" title="Title-Attribute" rel="test">a sample text</a>, greetings to all of you! :)
If there's no html in it, it's simple to localizate, but with HTML in it, how should I do it best?
...
Does anyone have written multibyte variant of function strtr() ? I need this one.
Edit 1 (example of desired usage):
Example:
$from = 'ľľščťžýáíŕďňäô'; // these chars are in UTF-8
$to = 'llsctzyaiŕdnao';
// input - in UTF-8
$str = 'Kŕdeľ ďatľov učí koňa žrať kôru.';
$str = mb_strtr( $str, $from, $to );
// output - str without di...
I am wondering if there's a way in CakePHP to nest multiple models in a form?
What I'm trying to accomplish is to make a form for creating Posts that will also contain fields for adding Images (separate model) that will automatically be connected to the created post.
Something similar to Ruby on Rails ** accept_nested_attributes_for**...
Hey folks,
I'm currently developing a site in Joomla, and one of the components I'm using makes use of a PHP file to administer the language. (english.php, spanish.php)
The problem I'm having is that if I use the plain text version of eg. "á", it will show up in the browser tab title ok, but as a � in the body of the page. But if I use...
Can PHP dissect its own syntax? For example, I'd like to write a function that takes in an input like $object->attribute and says to itself:
OK, he's giving me $foo->bar, which means he must think that $foo is an object that has a property called bar. Before I try accessing bar and potentially get a 'Trying to get property of non-obj...
I have installed PHP to work with IIS6 (with FastCGI). I am capable of viewing a sample test website that shows the PHP info with the following code:
<?php phpinfo(); ?>
Now that this works I tried to migrate my PHP website to IIS6 and here is a list of the errors/warnings I got:
PHP Warning: session_start(): open(C:\WINDOWS\Temp\sess...
I have a .htaccess file set up to define specific MIME types in directory root/a/b/, and all of the files are in the same directory.
I have a php file that wants to serve those files, in directory root/c/, and needs to determine the content-type as defined by the .htaccess file.
Is there any way to do this? PHP version is 5.1.6. mime...
By example:
FirstString='apple,gold,nature,grass,class'
SecondString='gold,class'
the Result must be :
ResultString='apple,nature,grass'
...
Hi. I'm trying to explain as best as I can, sorry for my English.
I have a list of links, each linked to a php file with an id by parameters (ex. download.php?id=1 or ?id=2 and so on).
This file create a new instance of a class witch return the correct header of the files so it displays the save dialog box of the browser.
Now I need to ...
Hello everyone,
I am trying to do file browser in a tree form and have a problem to sort it somehow.
I use PHP and MySQL for that. I've created mixed (nested set + adjacency) table 'element' with the following fields:
element_id, left_key, right_key, level, parent_id, element_name, element_type (enum: 'folder','file'), element_size.
...
To start off, let me clear the air by saying we are aware of the dis/advantages to using short tag syntax in PHP. That is not what this question is about.
Is there a way to "include" a file containing short tag code, into a variable, and have PHP actually parse the code?
include/require obviously do not provide the data in a workable f...
Last summer I learned HTML and CSS for a job, mainly through tutorials and a sort of "build this" method, that is, I'm given a goal and have to try to figure out how to build it myself.
Is there a place with some examples to teach someone with this method? My boss wants to get me going on PHP this summer, and I need to refamiliarize mys...
I've set up a contact form in the Greet Us page in http://swedsb.com
When I submit the form, it says mail sent successfully. But I'm not getting the mail, checked the spam folder.
I've set a similar form at http://ibsolutions.in. It is working perfectly.
Been breaking my head for the past 4 hours. Here's my contact.php
<?php
...