Recursive directory searcer PHP
How can i write an recursice directory searcher that takes a geven string and return the whole path plus the filename in php? ...
How can i write an recursice directory searcher that takes a geven string and return the whole path plus the filename in php? ...
HI, I have code like this. what I am doing is populating the first select with the MySQL data and based on the selection the first , using jQuery, I am populating the second one. Now, my question is, can I use the same combos_get.php to populate the another select based on user selection from the second select? Is yes, then please loo...
Hi I am using php system to embed a cgi-script like this <?php echo system('./cgi-bin/rebol-include.cgi'); ?> Problem is my cgi-script writes print "content-type: text/html^/" so that PHP will show up "content-type: text/html" above the html page. This is an unwanted artefact, what's the optimal way to remove it knowing a whole...
I would like to know what's the best way to limit ajax call / time. I'm running the following js function when the user mouseover a table row. function load() { $.ajax({ type: "GET", url: "process/ajax.php", data: "action=action, success: function(msg) { if(msg!='') ...
I see .class and .inc included in file names a lot of the time. My current understanding is that this is just a best practice to make the purpose/contents of the file clear. Is there any instance in PHP where a .class or .inc file name has a special purpose and truly means something? ...
Hi there, I currently ran into the issue that I do not have the money to buy/rent any professional captchaing service. So I tried to look around for OS captcha generators, and captcha designs. I also had a brief brainstorm about my own and simple captcha design. Do you have any preferences, or can give me a good advice handling captch...
I need to modify my function to return also the current folder I am in. Here is my current function: function getLinkFromHost($url){ $port = $_SERVER['REMOTE_PORT']; $server = $_SERVER['HTTP_HOST']; if($port == 443){ $type = "https"; } else { $type = "http"; } return $type . "://" . $ser...
I've been reading through a previous solution to a recursive mod_rewrite problem that is similar to what I'm trying to do, the difference is I'm sending all queries through an index.php file and so don't need to specify the script within the query. Essentially I want to recursively convert any number of parameters within a search engin...
I have been doing web development for the past 3 years, mainly in PHP and MySQL. Lately I have been changing into the C/C++ area. The reason is that I want to try out something new and expand my skillset before deciding which area I want to focus on. I would like to get advice from you guys about this. Is this a good idea? Is it a bad i...
Here is the exact problem. I have an autoload function set up with a piece of code that looks like this: if(file_exists($class_file)) { include($class_file); return true; } However, when $class_file is set to a certain value, I get an include error: Error String: include(includes/php/utilities/calendar_event_html.utility.php) [fu...
I am running PHP5 on IIS7 on Windows Server 2008 R2. Check out the below code which writes a string received via a POST request parameter into an XML file. <?php $temp = ""; if($_SERVER['REQUEST_METHOD']=="POST"){ if($_POST["operation"]=="saveLevels"){ $fileHandle = fopen("c:\\inetpub\\wwwroot\\test\\xml\\levels.xml", 'w'); ...
Hello, I have a method in codeigniter that looks like this, public function category() { //$this->output->enable_profiler(TRUE); //echo "Hello function called by ajax"; $table = $this->uri->segment(3); $content_id = $this->uri->segment(4); $data['content'] = $this->site_model->get_content($table, $content_id); $this->load...
I have the following code to display all pages into a nav bar in Wordpress <ul> <?php wp_list_pages('title_li='); ?> </ul> Trying to figure out how to add a div class to each li? ...
Hello. I'm trying to write a PHP script to backup a MySQL database: if ( $db_resource = mysql_connect($db_server, $db_username, $db_password, $db_newlink) ) { if ( mysql_select_db( $db_name, $db_resource ) ) { $backupFile = $db_name."_".date( "Y-m-d-H-i-s" ).".gz"; $command = "mysqldump --opt -h ".$d...
I love the windows 7 sticky note app and need to write a quick script to copy my notes to my iphone (easier than bringing a laptop to meetings). How can I extract my notes from the stick notes file (C:\Users\USER\AppData\Roaming\Microsoft\Sticky Notes\StickNotes.snt). The file stores undo entries, or other meta data, for each note, so I ...
Hi, I got an old PHP system integrated with a new CakePHP one. The problem is when displaying data I occasionally get index undefined errors meaning the models aren't related to where they're supposed to be maybe because there's no validation. There are gaps resulting into models loosing their relationship with a model I'm expecting henc...
i just want making a system that can open a file in a zip archive like i have archive.zip in this file.text i want make a class to makr this page zip.php?archiver=archive.zip&file=file.text i want this page show me the file.text contents any ideas? ...
Hi, I have 2 variables each containing a number (integer). I would like to sort them to have the lowest number first and the second largest. For example: $sortedVar = getSmaller(45, 62); // Will return 45 $sortedVar = getSmaller(87, 23); // Will return 23 Do you see what I want to do? Can you help me please? Thanks :) ...
I am creating a query to pull results from a MySQL database using PHP, the results of the query are output to an Excel document. Here is the query: $sql = "SELECT node, port, MAX(utiltx), MAX(utilrx), time, hour(time), day(time), month(time) FROM intfstats WHERE node IN('$separated') AND year(time)=$year AND month(time)=$month AND por...
Hi, I want to upload an image with Zend Framework version 1.9.6. The uploading itself works fine, but I want a couple of other things as well ... and I'm completely stuck. Error messages for failing to upload an image won't show up. If a user doesn't enter all the required fields but has uploaded an image then I want to display the up...