Hi Mates,
I'm just wondering what is the best way to separate logic components from the layout in a PHP web project?
The content is stored in MySQL, the logic is PHP and the templates are HTML/CSS of course.
My question is, how to solve this issue best (without using a CMS).
greetz, poeschlorn
...
I've got the string
$result = "bei einer Temperatur, die etwa 20 bis 60°C unterhalb des Schmelzpunktes der kristallinen Modifikation"
which comes straight from a MySQL table. The table, and the php headers are both set to UTF-8
I want to strip the 'degree' symbol: http://en.wikipedia.org/wiki/Degree_symbol and replace it with the wor...
Im using eclipse PDT to develop a php project. There are several pieces of external code that we need to include (eg PHPExcel). Is there a way to set up my project so that i can get the auto suggestions from these classes etc whe typing the code but not get the list of validation problems and "todo"s that tey have? Perhaps i need to set ...
I have the following problem with Zend tool (component of Zend Framework)
When I give the command to create a controller without a index action the action is still created. I use the following command:
zf create controller auth 0
Is this the wrong command or is there a problem with zend tool.
I use version 10.6 of Zend Framework
...
What is the best way using PHP and Curl to POST an entire folder to another server.
...
Hello,
i have a table with categoryId, name and parentId. I would like to build a html list with parent and child tree like structure
my table looks like this
------------------------------------------------------------------
id categoryId parentId categoryName SortSeq
----------------------------------------------------------...
The simplest script:
<?php echo 'hello';
Takes about 3 seconds to execute. There seems to be a big time interval Apache waits until it serves a web page.
I tried turning off antivirus, disabling ipv6 and more but Apache is still very slow. What should I do?
EDIT:
Additional information:
Apache 2.2
PHP 5.2
It's only dynamic PHP fi...
I am developing a Form class in PHP responsible for displaying and validating an HTML form.
I know generally what the Decorator design pattern is, and I know Zend_Form uses the pattern extensively to provide easy customization to its output of the form.
I have looked through the source for Zend_Form, and cannot make heads or tails of h...
Is there a way to generate a distinct list in kohana controller ?
function action_load($pid) {
$v = View::factory('pages/registrationform');
$programme = ORM::factory('academicprogramme', $pid);
if ($programme->loaded()) {
$sid = $programme->mysubject->id;
$v->subject = ORM::factory('subject')->find($sid);
...
I am working on a file-handler class and am running into some issues with file streams. Providing functionality for operations such as append and overwrite are a simple matter of changing the mode passed to fopen.
However, providing an easy way to insert, update, and delete is proving to be more challenging. Pretty much, all the probl...
how can i install dBase on cpanel/whm with php version 5.3.2, i didn't see the option on EasyApache (Apache Update)
...
hi i am using pear spreadsheet in my project. its working fine on the localhost but on the remote server its throwing a fatal error...
Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/worm/Pear_packages/Spreadsheet/Excel/Writer.php on line 34
Fatal error: require_onc...
I have an Order object to represent a Prospective Order/Receipt. This is an entity. It has an identity.
I have a Writer object to read the Order object's properties and display it nicely.
It is a bit of a chore to have individual getters for all the pieces of the Client's Billing Details.
So, I am thinking of letting the Writer object...
i have a form with im validating using jquery and php so basically if the php echoes "input must be filled " the jQuery should put a red border around that input, but the thing works only after submitting the form two times, i explain: if i submit with input unfilled the php file echoes "input must be filled ", but only if i press agai...
I can't get the preg_match to find a word anywhere a the string.
I have this:
$bad_words = "/(\bsuck\b)|(\bsucks\b)|(\bporn\b)|";
$text = "sucky";
if(preg_match($bad_term_filter, trim($feedback_review_comment)) != 0 )
I need to return true but it only returns true if its an exact match, for example if
$text = "suck";
that return...
Hey,
I'm trying to redirect from one page to another while retaining the parameters.
e.g. if I have a page page.php?param1=1¶m2=2, what's the easiest way to extract "param1=1¶m2=2"?
...
I want to access information in an associative array by index like so
$arr = Array(
['mgm19'] => Array(
['override'] => 1
)
);
$override1 = $arr['mgm19']['override'];
$override2 = $arr[0]['override'];
but i get nothing from override2 why ?
...
I'm currently using the file component in the vork framework to upload a file and I keep getting this error:
Warning: move_uploaded_file(/uploads) [function.move-uploaded-file]: failed to open stream: Permission denied in /var/www/rto-vork/mvc/components/file on line 105
Warning: move_uploaded_file() [function.move-uploaded-file]: Unab...
Hi folks!
I have an AJAX call in my jQuery/PHP app. It needs to send some data to a PHP script to process (I have this part working fine).
My jQuery variable:
var form_data = {
urltitle: '<?php echo $urltitle; ?>',
subscribe: $('#subscribe').val(),
comment: $('#commentbox').val()
};
This works fine, the PHP script reads the...
Hi,
I'm working on a WP theme, which was working last I check and has since stopped. Maybe it's something little but it's driving me nuts right now.
I'm taking a youtube username and grabbing the latest video and embedding into the page. Seems to be pretty simple, but I may be attacking it wrong.
Here is my code(any suggestions?):
...