I'm not sure what I'm doing wrong. I am writing my php code in the same directory of the file that I wish to include is in. So, here's what I have written:
Code: include ('file.php');
This works without any problems. However, I wish to link to this file using an absolute path, rather than a relative one. According to most online tutorials, I would use the following code:
Code: include ($_SERVER['DOCUMENT_ROOT'] . '/directory/file.php');
However, this does not work. Does anyone know what the problem might be?
modifying a property of an object from a different class
I have 2 classes:- Math- Distancein my math class, I have this line:$distance = new Distance($this->query, $this->distances);and this property:public $special = array();in my Distance
PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a file located at http://..../loginregister.php. If that test is successfull, I want to branch to
DELETE FROM not working deletes wrong row
HelloI have the following code which i found but it doesnt work properly.. it comes up with a list of the items in the database e.g.item 1 - deleteitem 2 - delete item 3 - deletebut when i
What exactly is net neatrality?
What exactly is it? I think it's anti-censorship and... stuff... but I don't really understand it
Preventing blank or already entered values
Im trying to learn how to place a read file line by line and prevent duplicate entries and also BLANK entries, into my process php script, using feof, I have failed many times and get so many errors
Preg_match unknown modifyer
Hello,Im trying to write a little script for my forums i need to get the reply from my forums. Im trying thisCode: $pattern = '/<span
very easy question about SQL info
Hello,I think that I have a very easy question.I know how to create a form using php SQL and display the info.BUT the only problem that I have is:In my website, I am linking all the pages with the
DOMDocument parsing
Hello, I am parsing an xml file from an API which I have converted into a DOMDocument in php. This is mostly fine but one problem I have is when I do this:Code:
help connecting a form to php and then emailing the form
Ok. So, I made a form, and I need help to where when submitted, I get an email with the submitted details. I have attached all the files you might need. The email should look like the 'Email.html'
mail()
Hi all. I have a problem with emails. I am trying to set up a mail system where customers can subscribe to a news letter . Those who subscribe will receive a monthly email. They can unsubscribe using