Hi everyone,
When I'm testing locally, I have to add the name of the site folder as part of the path name when I'm including files, eg.
include $_SERVER['DOCUMENT_ROOT'] . '/site_name/includes/dbAdmin.inc.php';
Eventually when I upload the site to the hosting provider I'll need to remove the site name, ie.
include $_SERVER['DOCUMENT_ROOT'] . '/includes/dbAdmin.inc.php';
This is because the includes folder will be in the root directory.
This is going to be a real pain as I'd have to remove quite a lot of them, so I wondered if there was a way to avoid having to include the site name when testing or a workaround?
Appreciate any tips
Why doesn't this work? (SSH2)
This is my script:Code: <?php$connection = ssh2_connect('213.251.167.109', 22);ssh2_auth_password($connection, 'root', 'MGdgfskc');$stream = ssh2_exec($connection, 'useradd -d /home/users/test
Frustrated php Newbie
First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so I figured I could get this to work.So, my plan was to make a simple SQL server with a PHP bullitin
a function to check directory depth
I'm working on a php script to upload files in to a set directory.the user can select to upload into the "upload" directory or any of its subdirectories.at the moment the user is able to
Help With editting and deleting form
Hallo !!So look at this image :http://img194.imageshack.us/img194/8272/snapshot5f.png This table prints the titles of entries from a table in a database.. The code that i use for this table is this
Printing issues with xMII 11.5
For some reason, we have one report (and only one) that is giving us fits when trying to print. The user has JRE 1.4.2_13 installed. When he clicks the print button, IE freezes, and nothing prints.
Form always sends to error page...
Hello,Any help will be greatly appreciated. I am having trouble getting multiple fields to be required, and with the if multiple errors section. I think that's where the problem is. When I click
Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to do everything I want except for this. I want the script to only show 5 at a time (which i have
Odd or Even
Inside of a while loop I need to echo several rows of info...easy enough.In the loop (for the sake off css) I need to distinguish between odd and even row numbers.Code:
frame help
on the bottom frame is menu.htmlCode: <body><form action='link.php' method='post' name='changer'><label>URL<input type="text"
Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spamming, and not just regular spamming. They edited all the current user posts to their name, and