hi i was going to start leaning php and i cant setup a server is there a good emulator that will show me what im writing without having to run or be part of a server
I have a class with this in
self::$DB = new PDO("mysql:dbname=$dbname;host:=127.0.0.1" , 'root' , '');
and then this
public static function __callStatic($name, $arguments)
{
return call_user_func_array(array('self::$DB', $name), $arguments);
}
How does I make it right/work?
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'self::$DB' not found in D:\Mine Dokumenter\My Dropbox\www\Framework 3\database.class.php on line 19
hi,
I'm getting the following error when I visit a specific page of my website.
PHP has encountered an Access
Violation at 16B357F9
I'm using Drupal on IIS Server 6.
All the rest of the website works.
Also.. that page was working until 5 minutes ago...
Thanks
Hi
How to refresh a page every 10 minutes using php background process?
When i login to my account i can check my messages ,on setting timeout function the page reloads every 10 minutes but i need the process to run in background ,
After me logging in,.. if i receive some message i must receive a popup called hai you have a message from this sender
Hi All
Currently developing a PHP framework and have ran into my first problem. I need to be able to drop the framework into any folder on a server, no matter how many folders deep, and need to find that directory to use as a base URL.
For example, it currently works if I put the framework in the root of the server (http://cms.dev/), but if I were to put it in http://cms.dev/folder/ it does not work.
Please advise, any comments welcome.
BenTheDesigner
Using php I authenticate a user, then behind the scenes,they are then again authenticated a second time with a single .htaccess username & password. This would be the same for all users, but I would not want them to have to enter a username and password again and they would now be allowed to enter the password protected directory. I prefer not to use http://username@password:somedomain.com.
Any thoughts?
Hi,
I've been testing a PHP script that I'm posting values to every few seconds (latitude and longitude to be specific) and am wondering if there's an easier way to see what values are being sent to the script. Right now I'm writing the data to a txt file on my server, and refreshing the page every so often to see what values have been posted recently. Is there a way to just see what's going on behind the scenes (in terminal, perhaps)?
Thanks.
I am very inexperienced with PHP and I've having trouble calling a mootools function.
Here's my code:
echo '<script language="JavaScript">';
echo "Sexy.error('Test!');";
echo '</script>';
When I try it with a simple alert('test') it works just fine.. I'm confused?!?
how to get the value of input box while submitting the form in php
i need the url like this
www.example.com/te/?a=test&firstname=blabla
<form action="te/?a=test" method="post">
<input type="text" name="firstname" />
<input type="submit" name="button" />
</form>
I cant seem to send an email using PHP's mail(). I have also tried PHPMailer and Swiftmail with no success. However, the following command on the server delivers mail successfully.
cat test.txt | mail -s "test mail" [email protected]
Is there a way to trace where the problem is coming from? mail() just seems to return true or false.
Can this be done in 1 line with PHP?
Would be awesome if it could:
$out = array("foo","bar");
echo $out[0];
Something such as:
echo array("foo","bar")[0];
Unfortunately that's not possible. Would it be possible like this?
So I can do this for example in 1 line:
echo array(rand(1,100), rand(1000,2000))[rand(0,1)];
Hello, I'm a web services newbie and I've tried to learn it looking for tutorials in google... but I didn't found anything really helpfull...
Do you know any tutorial / web page / documentation for web services using PHP 5 native SOAP client? I need to implement a SOAP client for fetch/send data from a IIS server (for hotels reservations).
Is there some server that I can make tests with?
Thank you!
I some php code which gets info from a mysql database. The problem is that the date is coming out in the format : 2010-02-03 22:21:26
Does anyone know a simple solution to make the date more user friendly format. e.g 2nd march 2010 at 22:21.
Thanks
I have a url, http://www.jdocy.com/42343-32422
I want to replace the 42343 section of the url with php's preg_replace function.
How would I go about doing this?
This has to be pretty simple, but I'd like to parse the current URL and execute conditional code depending on whether the user is on the /sitemap/ directory.
So for example, if the site is example.com, and if the request is example.com/sitemap/.
Then I want to execute conditional code in that case. I'm using wordpress so I'm not sure if there is a built-in function that gets this...
A pure PHP solution is fine.
I was wondering how to save PHP variables to a txt file and then
retrieve them again.
Example:
There is an input box, after submitted the stuff that was written in
the input box will be saved to a text file. Later on the results need
to be brought back as a variable. So lets say the variable is $text I
need that to be saved to a text file and be able to retrieve it back
again.
Hope it makes sense,
Thanks in advance!!!
Hello guys,
Am developing a desktop app that will serve as message notifier, just like yahoo messenger and Gmail notifier does. All i want is that when a message is sent to a particular account, the php script would send message to a particular ip:port of the desktop application.
Any help
i have a menu, it contains multiple items, each menu item will retrieve data from the database.
i want to do it without the page refresh, i want like an area that will change when the user clicks on the menu link.
How should i send data to the php script and how should i get it from there and preview it on the page.
if you can send me any information, references or examples that will be great
Thanks in advance.