php5

search files in directory using php

i have a situation,i am creating a folder everytime when new user register.the folder name is equal to username.so therefore user_data folder contains all folder which name is equal to username. when user upload something then it directly save to its desired username folder. so now i want to search perticular file from these folder. i k...

How do i pass the params to the zend_navigation which references the other page

$pages = array( array( 'label' => 'Search', 'title' => 'Please Search', 'uri' => 'Search.php', 'params' => array('stcode'=>$stcode) )); now the pages array will be passed to the zend_naviagtion $container = new Zend_Navigation($pages); $view->getHelper('navigation'...

PHP code writing

Hi Folks, I need a help to write code in php following server generate .pdf file at /root/datatools/report folder, which works with firefox well i need to write a php and get run in cron can same help me with this i dont coding in php or any other scripting. we want to watch the report folder and if any request comes get report for the...

Disallowed character when posting field name in codeigniter

Hi, I have an issue when posting fields like the following in codeigniter type="checkbox" name="test[some content]" Notice the space between [some content]. If there is no space it works fine, but I need it to have space. Any help is greatly appreciated. ...

Where can I get PHP to install on windows server (x64).

Hi. I'm trying to find PHP to install on a windows server machine (x64), but don't seem to find it on http://windows.php.net/download. A ftp link would be helpfull thank you. ...

Testing Tools for PHP

Hi , any good open source/commercial PHP testing tools available?? ...

Best practice for organizing SQL queries in code?

I have a bunch of beautiful OOP code but the functions have these monstrously huge SQL queries. In 2010, should we really still be writing our queries in-line or is there an abstraction, like MVC, for SQL queries in PHP? Thank you for your insights. Edit: I probably should have mentioned this here. But as a professional PHP engineer,...

Repair Data Integrity

I think this is a long-shot, but here it goes: The basic question is: how does a development team beginning to repair data integrity on a large, damaged dataset? The company I'm helping out has a huge MySQL/PHP5 sytem with a few years of cruft, invalid data, broken references, etc. To top it all off, this data references data on a few ...

How to add to array

Hi, I need to add some new values to array by doing something similar. $array = array(); $array[7] = 'test1'; $array[7] = 'test2'; The problem is that [7] only takes the last value that was added and not test1. Thanks for any help. ...

Does _COOKIE info have only the cookies of the current Request

Hi all, What does _COOKIE variable contain. Does it just contain the cookie that is sent by the browser for the current request? ...

Accessing Session variables in /ext/mysql extension

Hi all, I have declared a structure that look like typedef struct { char* key; char* value; }kvPair; and in the session structure, i declared a variable as struct session { char* id; ..... // other session variables kvPair* pair; } Now in the session_start I have initialised the values for the ...

Is it possible to invoke PHP_FUNCTION from within the extension

Hi all, let me elaborate more on the Title. Consider for example PHP_FUNCTION(session_start). Will I be able to invoke session_start from within session_id which is another PHP_FUNCTION (this is just for illustration not the actual purpose)? ...

print the php code

Hello guys, i want to simple like this echo "$_POST['id']" . $_POST['id']; so how can i print this string and its value. ...

PHP : dynamic sub domains for each user using htaccess

Hello guys is it possible to create dynamic sub domains for each user using htaccess. for example if there is a user with user name myusername, then add a sub domain for him like htttp://www.myusername.example.com, and when somebody load this page it should come as http://www.example.com/?user=myusername ( using htaccess ) Is it possi...

What is basic difference echo Vs print.

If there is any option available with one echo or print which can't be in other? ...

Why is fopen() behaving like this????

I am currently working on this project which requires me to make a function which dinamically decides the directory name and then creates a simple .txt file in that directory. my code is as follows: ($destinatario is a string) $diretorio="../messages/".$destinatario; if (is_dir($diretorio)) { ; }else{ mkdir($diretorio); } ...

Zend Controller Question

Hi, i have created a controller in which the default index action is being used to display a login form and then authenticate the user. However i have ended up having to add functions into the controller which i feel will clutter up the controller. for example i have functions like: protected function _process($values) { ...

Creating Shared libraries in PHP

Hello people, Im working on a few php based projects and im having an issue of having to maintain separate code bases with common code. The common code shared amongst all the projects is added physically (file are copied in the folder) and when a change is needed we have to manually replicate the fixes in the common code functionality in...

how to store value in array & then it use in other?

i am performing search condition of image file & using print_r() it shows output of image path in array. now i want to store this array & perform search operation for particular image path in that stored array. this is code of searching image file: $root1 = $_SERVER['DOCUMENT_ROOT']; $directory = $root1.'/Place4Info/Data/Admin_...

class member function in function?

So i have this class that includes some custom functions named class.php I have another file called config.php that includes require('engine.class.php'); $engine = new engine; config.php also requires functions.php to run like: require('functions.php'); i have a function in functions.php that uses $engine eg: function login($usern...