Jump to content

How to get index.php to be my homepage?

- - - - -

  • Please log in to reply
2 replies to this topic

#1
onething

onething

    Programmer

  • Members
  • PipPipPipPip
  • 118 posts
I downloaded a script from hotscripts.com called Max's image uploader and its designed to work at index.php

How do I get it to work at mydomain.com homepage instead?

#2
CommittedC0der

CommittedC0der

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,565 posts
When your site is navigated to, it automatically directs you to "index.YourFileTypeHere" even if it doesn't say it. So "mydomain.com" should be the same as "mydomain.com/index.php" you just cant see it.

I assume on your website you have index.html currently? If so either replace it with the index.php file, or embed the php code into your current html file.

I hope I understood correctly and didn't give you a stupid answer, good luck. ~ Committed. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.

#3
onething

onething

    Programmer

  • Members
  • PipPipPipPip
  • 118 posts

CommittedC0der said:

When your site is navigated to, it automatically directs you to "index.YourFileTypeHere" even if it doesn't say it. So "mydomain.com" should be the same as "mydomain.com/index.php" you just cant see it.

I assume on your website you have index.html currently? If so either replace it with the index.php file, or embed the php code into your current html file.

I hope I understood correctly and didn't give you a stupid answer, good luck. ~ Committed. :)

Thanks, but ive tried pasting all the stufff from the php file to the html file and no luck.

ive tried eliminating the php file too.

this is the php file from hotscripts:

<?php require_once("maxImageUpload.class.php"); ?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

   <title>Max's Image Uploader</title>

   <link href="style/style.css" rel="stylesheet" type="text/css" />

</head>


<body>

<?php

    $myImageUpload = new maxImageUpload(); 

    //$myUpload->setUploadLocation(getcwd().DIRECTORY_SEPARATOR);

    $myImageUpload->uploadImage();

?>

</body>   


---------- Post added at 03:00 PM ---------- Previous post was at 02:38 PM ----------

ok it seems to be working now, i elimated the previous html page and put this in.

Well its nearly working now. It seems my mozilla insists on caching the previous page or something of the sort.

But now im getting
setUploadLocation(getcwd().DIRECTORY_SEPARATOR); $myImageUpload->uploadImage(); ?> 

I know it must relate somehow to a file in the script called maximageupload.class.php but i havent figured how yet. Hopefully there must be somewhere in it to change the uploadlocation to the homepage but i havent found it yet.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users