How do you create variables in actions.class.php so that they are accessible in layout.php?
In Symfony 1.2, how do you create variables in actions.class.php so that they are accessible in layout.php? ...
In Symfony 1.2, how do you create variables in actions.class.php so that they are accessible in layout.php? ...
Hi, I have a multi-dimensional array, which basically consists of one sub-array for each year. So, for example, if I had three year's worth of data, it might look like this: $data[0] = Array(0,1,2,3,4,5,6,7); $data[1] = Array(6,5,4,3,6,7,8,9); $data[2] = Array(1,4,2,5,7,3,1,4); Now I want to be able to sort those arrays on the basis ...
Given a string such as: a:2:{i:0;s:1:"1";i:1;s:1:"2";} I want to find every integer within quotes and create an array of all integers found in the string. End result should be an array like: Array ( [0] => 1 [1] => 2 ) I'm guessing you use preg_match() but I have no experience with regular expressions :( ...
given an array $galleries = array ( [0] => 1 [1] => 2 [2] => 5 ) I want to have a sql query that uses the values of the array in its WHERE clause like: SELECT * FROM galleries WHERE id = //values of array $galleries... eg. (1 || 2 || 5) // How can I generate this query string to u...
I am playing about with the Zend Framework at the moment and I have a written the authentication code using Zend_Auth. I am trying to find a way to ensure that the user is logged in before they can view anything but I don't want to do it on a per controller basis. I am thinking a plugin, but all the books I have on it are pretty rubbish...
I know, strange title.... this is my problem: I have the cakephp stack in /var/www/site from one view under controller A I do a jquery ajax call: $("#searchstring").autocomplete("/items/getitemsforautocomplete", { ... more code when the call is triggered I can see from firebug that cakephp wants to call: http://localhost/items/g...
for an IM script i am making, i would like the computer to beep like in gmail everytime there is a new message. is there a script in php or html to make the computer beep? Thanks! ...
I have a PHP script which changes file permissions on my server using chmod. I'd like to be able to run the script both via the browser (as nobody) and via a cron job (as username). Is it correct that only the owner of the file can change the permissions? I.e. if I create a file via a cron job and set the permissions, I can't then cha...
I am new to php, but in other web technologies, you can share objects between page instances. For example, in java jsp pages you easily have on class that exist as static class for the whole server instance. How to do this in php? I am not refering to sessions variables (at least I don't think so). This is more for the purpose of resou...
I want to create an platform for a local old-timer club, which has: built in forum (not so over sized like phpbb & others. lightweight and highly integrated.) member profile with 20 fields members can create a garage members add car pictures to their garages others can vote and comment the pictures members can message each other and ...
I'm building a blog that should parse bbcode tags like this: Input: <youtube=http://www.youtube.com/watch?v=VIDEO_ID&feature=channel&gt; Output: <object width="400" height="245"> <param name="movie" value="http://www.youtube- nocookie.com/v/VIDEO_ID&hl=en&fs=1&rel=0&showinfo=0"></param> <param name="allowFullScreen" value=...
I've been using Textmate for Ruby/Python scripting for awhile and now have a need to hack on some PHP. I'm having some troubles with the bundle: The code-highlighting doesn't support HTML... When I type php + tab TM spits out: ?><?php> instead of: <?php ?> Anyone know where I could possibly be going wrong? Thanks in advance... ...
In CakePHP, how can I make an array we use accessible by the whole application? Is there an equivalent of PHP's define() function? ...
Hello; The company has an ERP application that supports only once company using one database, how to make the application support multiple companies and multiple databases using the same code? The application is a PHP and the database is MySQL. Thanks. ...
Hi, the question's in the title really. I have an online form where, after a series of stages, the user is sent off to a payment gateway on another server, then back again after completing their details there (no card or personal info is sent, just encrypted tokens, that's the point). So can I rely on the session data still being avail...
Ok - this is in continuation from my earlier question about sending an email using a php script. I'm now using PEAR to send the mail. The php script i use is the following one (successfull if executed alone): PHPEMail.php <?php require_once "Mail.php"; // Pear Mail.php $from = "FromName <[email protected]>"; $to = $_POST["dest...
It should be free,easy to use, and that's all! ...
It's PHP question. I set open_basedir, and it is not more possible for access for the folder in the hierarchy of the bottom even if I make it accessible for a specific directory. For example, when it was the directory of the hierarchy that said /home/user1/test/example/ open_basedir=.: /home/user1/test/ When I set the file arrang...
Hi I'm using jQuery and Codeigniter. I'm creating a simple todo list that can add delete entries using ajax. The problem is whenever I click on my delete anchor, it won't delete the entry. The adding of the entry feature works BTW. Here's my code: todo_view.php <html> <head>Todo List</head> <script type="text/javascript" src=...
Hi, is there a way to batch copy certain wikipedia articles(about 10,000) to my own mediawiki site? EDIT: How do I do this without overwriting similarly named articles/pages? Also I don't plan on using illegal means (crawlers etc) ...