Jump to content

rorybing

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rorybing's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi Thorpe, Apologies, I am not too up on my hosting services. I purchased a Windows based package from a hosting provider. I've looked through my account details, but cannot see where I would find the http server in use. Sorry for not being able to provide further information. Not sure what I should be looking for.
  2. Hi, Apologies for the delay in coming back, I was caught up on other things. At the moment, I have the following structure; SITE_ROOT/ index.php FILES_INDEX/ public_files.php INCLUDE_FILES/ constants.php db_conn.php sessions.php IMAGE_FILES/ etc This would be incorrect though, not secure? Does your structure below prevent from malicious users wanting to get access to the tree structure, or is it possible they could still potentially get access? Thanks for your response.
  3. Hi, It is not IIS on a local machine, it is a Windows hosted site with a domain provider. I already have the sensitive files in folders and subfolders on the site, they are not in the root. This isn't fully secure though, would it be? Thanks.
  4. Hi, I am running my website on a Windows hosted server, but I am trying to secure my php pages against malicious attacks. I know with an Apache hosting server, you can implement a .htaccess file to secure unauthorised access to your files, i.e. containing your constants and db connections etc. Is there any equivalent for a Windows hosted site that will allow me to secure my files in my folders against unwanted access that is similar to a .htaccess file? Thanks.
  5. Hi, Thanks for the reply. So I should really do this if ($count > 0) { $rating=($current_rating/$count, 1); } Something like that? What would the 1 at the end of that line also mean? Thanks.
  6. Hi, I'm looking through some code I have for setting up a rating system. It was a free open source code, which I need to change to work for my own site. I have it working, but I am now just looking through the code to try and understand it, and for the most part, I do. There is one part I am not familiar with, if somebody could help me please? Values involved; $current_rating = total rate value of votes $count = total number of votes cast Problem I have is the @ symbol here $rating=@number_format($current_rating/$count, 1); Does it format it to decimal places or something like that? It's probably something simple I know, but I am a relative newb. Thanks.
  7. Hi, I have a file structure for all my files on my website that works fine for the most part. The basic layout would be something similar to the following. - root folder - sub_folder1 - folder1 - folder2 -sub_folder2 - folder1 - folder2 Each of the folders would contain relative .php files carrying out specific functions etc. The issue I am having is as follows. If I am on a webpage that is located in either of the folder1/folder2 folders, and I need to redirect somebody to a file located in the root folder, I am not able to do this without the page not being displayed correctly. On the file located in the folder1 folder, I have a <? php include("page1.php");?> which works fine. Trying to access a file to redirect to from this folder, I have tried, <? php include("../page1.php");?>, but this only bring me up one level, <? php include("../../page1.php");?> which I think is wrong anyway, and doesn't work, and also <? php include("./page1.php");?>, again does not work. Does anyone know if it is possible to get the file from the subfolders to access a file located directly in the root? Sorry if I'm not being clear explaining the layout etc. Thanks.
  8. Hi, Thanks for all the replies. I ended up just making a function, passing the page I wanted into that function, and redirecting from there. Did the trick. Cheers.
  9. Hi ManiacDan, Thanks for the reply. What would be the command for stopping the buffer? Where would the buffer start? Before the DOCTYPE at the top of the page, or before any code has been written for displaying the page? Thanks.
  10. Hmmmm, might need to start learning JavaScript in that case. Not the most experienced programmer here to be honest
  11. Hi, I'm trying to figure out if I can get a redirect page to work, without needing to use the header("Location: page.php"); command. I know with asp, there is a response.redirect for redirecting pages, but, with the header, I can only use this, if there is no output before calling the command. Is there any method that can be used where I can process some code, if output is required, and depending on processing on the page, redirect it to another page, using a command similar to response.redirect? I have seen the http_redirect, but I can only see this working with clearing buffers etc. I have also a redirect_to("page.php"); command, but I cannot get this to work. I am using php 5. Any help would be appreciated. Thanks.
  12. Hi, Thanks for the quick reply, I knew it was gonna be something simple I was doing wrong. Got it connected there. Thanks for your help.
  13. Hi, I'm trying to set up a mysql database on my laptop, XP, and connect to a test database using php. I've created the database called 'testdb' with user account 'test' and password 'password. The code I'm using to try and connect to the test datase is the following; $dbconnect=mssql_connect("localhost", "test", "password"); But when I open the page in a web browser, I am getting the following error; Fatal error: Call to undefined function mssql_connect() in <file_location> I'm hoping I'm doing something simple here, but, I've looked up forums and this seems to be the code to use to connect. Anyone who could help would be greatly appreciated. Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.