I am trying to integrate two PHP scripts (app1, app2) and I am trying to get session data from app1 in app2.
The problem is when I am trying to unserialize the session data from app1 I am getting a small ton of errors because PHP is trying to find the __wakeup() function for each of the objects.
I can't use the unserialize_callback_fu...
I am working on Windows server and able to run command from command prompt
c:> %convertxls% {some args....}
But when I run same command from php script
*shell_exec(%convertxls% ..... 2>&1);*
it gives me error as
%convertxls% is not recognized as an internal or external command, operable program or batch file.
I think when I ...
I've got a PHP-driven site that has a recordkeeping form. The user chooses a battle in the first dropdown, then the winning side in the second. Currently the winning side options are only Side 1 , Side 2 corresponding to which was listed first in the battle setup. The submission has an "are you sure?" step to make sure they have a chance...
I have the following string for example:
Welcome to my <a href="http://example.com">site</a>. Feel free to <a href="http://localhost.com">contact me</a>.
What technique may I use to evaluate this string to add '/id/123' at the end of both of the urls resulting in:
Welcome to my <a href="http://example.com/id/123">site...
Further to my previous question, what's the best approach when I want to buffer PHP output until I have performed all processing? I want to buffer to leave myself the option to to redirect to an error page, which I can't do after any output.
So, what's the best practise? Use a variable $output and keep appending to it, then output it a...
Hi all,
I have been using Stackoverflow for a while to find solutions to my programming questions, but for the current question I haven't found a useful solution. So I joined up.
What would be a good solution to limit a Java applet to only one instance. I'm using php to serve the applet to the end user, so that would be an option.
But...
At the moment I am using a BATCH file that comprises of the following line of code:
c:\R\bin\Rcmd.exe BATCH "<filepath>/shares.R"
It opens and runs the following R code:
library(ggplot2)
library (XML)
test.df <- xmlToDataFrame(file.choose())
test.df
sapply(test.df, class)
test.df$timeStamp <- strptime(as.character(test.df$timeStamp...
Hey all I'm trying to validate a 'time' field using Zend Framework.
The docs seem to be pointing out that the following:
$tstarttime = $form->createElement('text','t_start_time');
$tstarttime->setRequired(true)
->setLabel('Start Time')
->addValidator(new Zend_Validate_Date('H:i'));
I've tried this but no luck. Any ideas or a...
Hi,
i have a mysql question.
I have a news section on my website, and i want to display the two latest items.
If i do:
SELECT * FROM nieuws ORDER BY id DESC LIMIT 1
it select's the latest item,
and now i want to select the second to last item.
Do you guys know how ?
Thanks in forward
/// EDIT
Now it doens't work, here's my co...
I have two page: rooms.php and reservation.php
User can only access to reservation.php via rooms.php
I have used define('NOT',1); and if (!defined('NOT')) exit('no direct!');
But when user goes from rooms.php to reservation.php there is error message?
Why define function not working? Thanks in advance
...
Hi,
I have a DB file content my DB info. the file db.php located on my mother's folder [here apps folder]. Now, how can I include the db.php file anywhere on the project using base_url()? Here is my base url function:
function base_url() {
return "http://localhost/apps";
}
I tried like this way but it does not work.
$link=base_u...
I am trying to access data of http://www.bbb.org/us/Find-Business-Reviews/ with cURL. Now I used HTTPFox to see what data does this site send and accordingly made an array to "POST" to the page. But I am having problem in accessing Page 2,3,4,5...
Here is the array -
$array = Array();
$array['__EVENTTARGET'] = 'ctl12$gc1$s$gridResult...
I have 7 years of experience working on PHP/MySQL. From few days I am in a dilemma because not able to see many opportunities in the MNC’s or in banking domain for PHP.
The question comes in the mind is “is it worth to switch from PHP/MySQL to .NET at this stage”
And if I switch without any plan how much money I am going to make. Beca...
Hi,
I was wondering if anyone knew of a plugin that notified all users when an new comment was made. At the moment it only notifies the author of the post.
Cheers.
...
I have made a custom loop in WordPress and for some reason, the date is being skipped on random intervals, even though the other post content is getting pulled in successfully every time.
Any ideas, because it is completely baffling me!
For example, a list of posts and when the date is missing:
Date
Date
No date
Date
Date
No date
...
I've got a website where URLs are rewritten in this format:
http://www.example.co.uk/module/page/query/
http://www.example.co.uk/index.php?m=module&p=page&q=query
Which gives rise to pages such as:
http://www.example.co.uk/schools/view/495/
http://www.example.co.uk/schools/search/park+lane/
Is there any way to make it so th...
QUERY 1:
$link = mysql_connect('localhost', 'root', '');
mysql_select_db('rems', $link);
mysql_query('SET AUTOCOMMIT=0; START TRANSACTION', $link);
mysql_query('DELETE FROM admins WHERE admin_id=4', $link);
mysql_query('ROLLBACK; SET AUTOCOMMIT=1', $link);
QUERY 2:
$link = mysql_connect('localhost', 'root', '');
mysql_select_db('rems...
Hi,
I am trying to update a MS SQL Server database from my iPhone application.
Here is what I have in the XCode:
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://www.xxxxx.com/UploadTextView.php"]];
[request setHTTPMethod:@"POST"];
NSString *postString = self.textView.text;
[r...
I am working with the XML file string below and I've tried a number of methods to try and get access to certain parts of the XML contents. Please see the code after the XML file below for my attempt:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org...
Check this code:
$select = mysql_query("SELECT * FROM nieuws ORDER BY id DESC LIMIT 1");
while($row = mysql_fetch_assoc($select)) {
$datum = $row['time'];
$titel = $row['title'];
$bericht = $row['message'];
?>
<div class="entry">
<spa...