Jul 20, 2008

.php?id=html Not Working

Free Web Hosting, No Ads > General > Hosted Members Area
Pages: 1, 2

free web hosting

.php?id=html Not Working

jlhaslip
Okay, that looks okay.

Sign-in to your account cpanel.
When you do that, see if this file is in the very first folder you arrive at. That is the Account Root.
The public_html folder is different. Click on the 'folder gif' on the left side of "public_html" to go to the public_html folder.
This file should be there, nowhere else, and the includes should also be in that second folder. (public_html)
If they are not, they should be moved/copied or re-uploaded. (is that a word?)

Man, it would be so much easier if I had your account password, but security is a biggie, so you will have to do this yourself... smile.gif

Reply

reith
Thanks very much for the help, it worked perfectly. If you have a spare moment, do you know exactly why my php include didn't work and the one you used did? Is it because things work better / right with these servers and they didn't on all the other ones I've been on? I'm not entirely sure why the two different codes do the same but one works while the other doesn't. However thank you very much for making it work for me, I greatly appreciate it. And I only put that much code because he said he wanted to see all of the php file >_>

Reply

truefusion
QUOTE(reith @ Nov 2 2007, 01:03 AM) *
Thanks very much for the help, it worked perfectly. If you have a spare moment, do you know exactly why my php include didn't work and the one you used did? Is it because things work better / right with these servers and they didn't on all the other ones I've been on? I'm not entirely sure why the two different codes do the same but one works while the other doesn't. However thank you very much for making it work for me, I greatly appreciate it. And I only put that much code because he said he wanted to see all of the php file >_>

I'm not really sure why your old code would work on the other server and i don't see how it could have, but mine worked because i told the PHP script to place what it gets from the GET method into a variable—the variable you declared. Without it, the script shouldn't (although more like can't) work the way you want it to.

 

 

 


Reply

jlhaslip
Here is another approach to take

CODE
<?php

$id = $_GET['id'];
if (file_exists( $id)) {
    require_once($id);
} else {
    die("unable to open file ($id)")
    }

?>

Reply

truefusion
Note: It is more secure if you use this code:
CODE
<?php

$id = $_GET['id'].".html";
if (file_exists($id)){
include $id;
} else {
echo "The requested file does not exist.";
}

?>

That way, you don't have to type in .html at the end of the URL, and just the name of the file instead. Plus, if you use the other code, you'll get the same effect as if you were looking into a mirror that's infront of another mirror if you were to include the same page, example: http://www.eternaldiscordrpgs.trap17.com/r...d=reithonry.php (let it load for like 7-10 seconds, and you'll see why—be sure to stop the loading!).

Reply

dave2win
Hi,

I think that registered globals are not enabled on Trap17 servers so as you are forwarding your page id as GET mathod then you should use superglobal $_GET[]. You can put the variable ($id) within the parenthesis.


Like this

<?php include($_GET['$id']); ?>

I also prefer include_once rather than include. It's just a precausionary measure. You should also use superglobals whereever you wanna refer to data from other page which are forwarded to current scripts.

That's better programming.

I also add this. You should know your server settings from a phpinfo(); file on your trap17 server and then use them to manually configure your local PHP settings so that what runs on your PC should run similarly on your Trap17 servers, and other than your fiance the rest of the world can enjoy it.

Notice from rvalkass:

Merged double posts. Remember you can use the Edit button to add to your post if no-one else has replied.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2
Similar Topics

Keywords : php id html working

  1. Gallery Not Working - (1)
  2. My File Manager Is Working - (2)
    I tried to change the html for my site in file manager but it just has the default page - the one
    when you activate your site. /sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' />
    How do i change files?...
  3. Backup Not Working [resolved] - (5)
    I am trying to backup my files on my account(in preparation for the next server disaster), and I am
    unable to download it. In my CPanel I goto the back-up screen to generate a full backup. Once
    that's done and its ready to be downloaded, It only downloads to 13% or 50mb before stopping.
    With and without a download manager. It doesn't help that resume is not supported in download
    managers. I have too many files on my account to backup with an FTP client, that would take hours
    and hours. What can I do to get a backup of my account?...
  4. File Manager Not Working - (2)
    When I goto upload files using the file manager(legacy mode), the files do not upload correctly.
    Every time I try to upload a file, it takes the time to upload it, but the file always comes out
    being 0kb so it does not upload the file. Why is this happening?...
  5. Problems With Outlook Express - My email configuration isn't working (6)
    Does anyone have a clue as to why my outgoing email isn't working with Outlook express? I can
    get incoming mail, but I'm getting an error when I try to send email. I followed the
    configuration instructions, but it still isn't working correctly. I get an error everytime....
  6. Html To Php Convertor? - (12)
    Hey.I have made a simple website http://pakdir.com this is in html.But its very difficult to
    update the html pages.I want to convert it to php site.But i dont know about php language ... is
    there any "PHP website builder" ?? is there anyway to build a php website without knowledge of php ,
    with the help of some program ? for example there is a frontpage for html etc.Please tell me any
    solution?...
  7. My Subdomain Not Working - imbibe.in (3)
    I have a addon domain in my account (ramansingla.info): imbibe.in All subdomains on imbibe.in work
    fine but one. ike.imbibe.in isn't working. It's more than 24 hrs that I created it. Also
    when I tried to change Nameservers for ramansingla.info at GoDaddy for Primary Nameserver I entered
    NS.COMPUTINGHOST.COM & GoDaddy said Invalid. Kindly help as it is urgent. Thanks & resolved ......
  8. Toolbar Not Working (adobe Dreamweaver) - I dont know why but it doesnt link. (7)
    See, my toolbar is made up of 8 buttons. They are: Home | Lessons | Theory | Links Videos| Extras
    | Forums | Feedback To make my website, I use adobe Dreamweaver CS3. if youve ever used it, youll
    know that if you want to make an image a link, you need to click it and fill in the link box at the
    bottom and then make the border 0. The annoying thing is, lets say I type in in the link box for
    Home "index.html". Then, I take a look at lessons. Suddenly, that box is filled with index.html
    too! So, I quickly change that box to lessons.html. But then (this is where the ...
  9. Css Problem On Website - I've uploaded the html/css files but the css isn't working/ (8)
    Help? I've uploaded all of the html files and css files into the public_html folder , but the
    css isn't taking effect. I've checked both the css and te html files , nothing wrong with
    them. Halp me? www.genesis.trap17.com/home.html /sad.gif" style="vertical-align:middle" emoid=":("
    border="0" alt="sad.gif" />...
  10. Www Vs. Public_html [resolved] - (3)
    I didn't know where to post this..... this category seemed about as good a fit as there was. on
    most webservers (my trap 17 one included), there is a public_html folder and a www folder, anything
    uploaded into one also gets put in the other. so i am wondering what is the point of both of these
    folders? can someone tell me why each one exists?...
  11. The Cgi Centre In Cpanel Isn't Working! - (4)
    I was just randomly accessing the cPanel today and when I tried accessing the 'CGI Centre'
    It gives me this error message CODE <!-- Let's Not see the results of the install
    of cgiemail ... safeunlock: Invalid arguments at /usr/local/cpanel/SafeFile.pm line 91.
    SafeFile::safeunlock(undef) called at /usr/local/cpanel/Cpanel/FileUtils.pm line 331
    Cpanel::FileUtils::safecopy('/usr/local/cpanel/cgi-sys/randhtml.cgi-wrap'
    ;, '/home/obelisk/public_html/cgi-bin/randhtml.cgi') called at /usr/local...
  12. Bandwidth Counter Not Working - (17)
    In my CPanel, the bandwidth counter is constantly at 0, it never changes. I can never see how much
    bandwidth I've used this month. My awstats never work also, so i have no idea how much traffic
    is coming through my site. Does anyone know how I can fix my bandwidth counter? Thanks....
  13. Have There Been Any Changes? - PHP script not working anymore. (1)
    Hi, I was wondering if any changes have been made to the PHP and/or MySQL section at trap 17. All of
    a sudden a PHP script is beginneng to give errors where it never did before. I have a greeting card
    system on my website, and all of a sudden, when I try to add a card I get a load of errors, while I
    have not changed any code. These ar erthe errors i am getting: CODE Warning:
    imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions
    in /home/mrdee/public_html/kaart/admin/classes/class_images.inc.php on line 200 Warning&...
  14. Changes In Phpmyadmin - Access to my database from program not working anymore. (0)
    I was wondering if something has changed in the MySQL or PHPMyAdmin section of Trap 17. (Hope I am
    explaining this correctly). I run a newsletter system on my website and the details of the people
    who subscribed are in a MySQL database. To get those data from the database and to send the
    newsletter to all subscribers I use a program called "Qios Pelican". Up to now it always worked
    perfectly, but now it cannot seem to retrieve data anymore, yet I have not changed anything to my
    setup. I use the MySQL OLEDB Provider driver to connect, and in case it helps, here are the ...
  15. Awstats Not Working - (2)
    When I click into my Awstats, I get the following error: QUOTE Error: Couldn't open config
    file "awstats.leoncreations.trap17.com.conf" nor "awstats.conf" after searching in path
    ".,/home/leonc/tmp/awstats/,/etc/opt/awstats,/etc/awstats,/etc,/usr/local/etc/awstats": No such file
    or directory - Did you use the correct URL ? Example:
    http://localhost/awstats/awstats.pl?config=mysite Example:
    http://127.0.0.1/cgi-bin/awstats.pl?config=mysite - Did you create your config file
    'awstats.leoncreations.trap17.com.conf' ? If not, you can run "awstats_configu...
  16. Html Editor Glitch - (7)
    Three times I've tried using HTML Editor to edit my index.html page and the first 2 times it
    instantly deleted all the page's coding and replaced it with the word "undefined". I noticed
    the 3rd time after editing a page it gives the following message: QUOTE
    %2fhome%2fjoshua%2fpublic_html/index.html File Saved
    -------------------------------------------------------------------------------- open index.html
    failed: Permission denied at cpanel.pl line 469 Carp::croak('open index.html failed: Permission
    denied') called at /usr/local/cpanel/Cpanel/Fi...
  17. D-22 Shoutbox Not Working [resolved] - HELP!!!!! (3)
    i have just download d-22 shoutbox for my ipb forum, i flowed the instructions exactly and it
    installed. but when i type something into the field and click shout nothing happens. i have
    reinstalled it, gone to the d-scripting website and no-one can fix it but it does work because it is
    here can anyone help??...
  18. Web/ftp Stats Not Working [resolved] - I need help here (2)
    I tried to access my web/ftp stats page and the error below was what I got. Error: Couldn't
    open config file "awstats.microncyber.uni.cc.conf" nor "awstats.conf" after searching in path
    ".,/home/odomike/tmp/awstats/,/etc/opt/awstats,/etc/awstats,/etc,/usr/local/etc/awstats": No such
    file or directory - Did you use the correct URL ? Example:
    http://localhost/awstats/awstats.pl?config=mysite Example:
    http://127.0.0.1/cgi-bin/awstats.pl?config=mysite - Did you create your config file
    'awstats.microncyber.uni.cc.conf' ? If not, you can run "awstats_config...
  19. Problem With My Hosting [resolved] - Cpanel not working (5)
    Hello, I seem to be having a problem with my Cpanel. Try as I might, I just cannot get the cpanel to
    load. I keep getting a page not found error. I'm using the same thing I've been using to
    access it, sitename.trap17.com/cpanel....
  20. I Have A Question About Where To Put My Html. - (6)
    yeah i'm hosting a sit on her but i'm completely lost on how this stuff works can someone
    tell me where i would put the html?? or just how i would go about making the site work with stuff
    acutally on it.. please i'm in desparate need of help....
  21. Making Custom Error Pages With Cpanel - Not working properly (4)
    I set up the custom error pages using CPanel, but they aren't working properly. I get the
    standard error code. CODE The requested URL was not found on this server. Additionally, a 404
    Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Plust that little bit on the end. Am I doing something wrong or is it something that needs to be
    handled by an admin?...
  22. Web Mail Forwarding Not Working? - (0)
    I set up a several email accounts on Cpanel, and am trying to forward the mail from some of them to
    a gmail address. So far nothing's been forwarded. Also, when composing email, I've noticed
    the "receipt" function doesn't work. Any clues, anyone? On another note, I noticed Cpanel
    reverted back to it's former state after a brief upgrade. What's the latest with Cpanel?
    Several days later and still no response? /huh.gif" style="vertical-align:middle" emoid=":huh:"
    border="0" alt="huh.gif" /> Mmkay, guess I'll pm admin directly........
  23. Smtp Server Is Not Working...? - I think there is a prob. with my SMTP server (4)
    I am posting this because I believe there is a problem with my SMTP server (at Trap17.com). I have
    been trying to send mail with PHP using the mail() function. Although PHP did not return any errors,
    none of the mail was actually sent... I have enclosed a copy of 2 different codes I have tried to
    use. Either I'm making a mistake with these codes or there js a problem with my SMTP server. If
    there is a mistake with my code, please tell me what is wrong. Otherwise, maybean admin can look at
    my SMTP server configuraton to make sure it works. CODE 1 CODE $email...
  24. Site Not Working! - (7)
    i had just registed myself on trap17 in the create a forum thingy and i cant get onto my site its
    not letting me get onto the site or the control panel or the ftp, it just keeps saying PROBLEM
    LOADING PAGE, please help me /sad.gif" style="vertical-align:middle" emoid=":(" border="0"
    alt="sad.gif" />...
  25. Help My Forum Connection Isn't Working - (4)
    can anybidy help me. I have had a forum amde and I can;t access it??????? Contribute with quality.
    You could have gave more information like which forum software, URL to your forum, what error
    message and the exact nature of the issue, i.e. it shows this but not that...or not showing at all. ...
  26. Is The Report Function Working? - (3)
    I have asked many mods this, and have been told no... i have asked an admin i never got an answer
    ive asked in almost every PM report ive sent.... lol so here it is again "Is the Report Feature
    Working?!?!?" i was told my one mod yes it was yet a few days ago i was told my 2 no... hmm
    i cant get a straight answer *sigh*...
  27. My Feedback Php Module Isnt Working... - (2)
    Well i tested by tryin to send myself a feedback and i receieved nothing in the mail about my
    feedback...i have no clue how to figure this out...i checked in my preferences and put down the
    right email address for myself im not sure wut else to do...do i have to get into any of the php
    files?? help me out ive had this problem ever since i started hosting a long time ago...
  28. No Php Pages Working - (3)
    Hi people! I just noticed that none of my php pages are working, they dont have any source so
    arent sending anythnig to the browser which is strange as it seems like they are working on the
    server because they are detecting if someone is logged in and redirecting accordingly but theres
    just no soruce code and no page showing up. My HTML pages seem to be working ok but my site is
    dependant on php /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
    Any ideas to the problem or just the server being difficult like computers do? Thanks ps ...
  29. Domain And Ftp Not Working...? - (3)
    Hey all, i just got my hosting yesterday and tried to access my control panel but it doesnt work...
    i get this -->Error: Domain Not Configured My domain is registered with bravenet and im
    thinking maybe it wont allow me to use it through another host which is a real bummer! and the
    only options i have for the domain is to set it to redirect which is of no help unless i had a
    subdomain and pointed it to there.... :\ I guess this also explains why i cant login to the
    ftp... Although i thought u should be able to use a domain name anywhere... :\ Any h...
  30. Help With Webhosting - index.html? (4)
    I need help with my webhosting. Whenever I access http://portal.trap17.com , this comes up: QUOTE
    Welcome to your Hosting Account! This site is currently Hosted at trap17.com If you are
    seeing this message then it means that your site is up and your account is functioning properly.
    Please see to it that you do the following steps before you continue :- 1. Login to your cpanel
    by typing, http://yoursite.com/cpanel . 2. Enter the userID and Password. (check your PM at the
    Forums or your requested post) 3. Change the Email address in your Cpanel. (u...



Looking for , php, id, html, working

Searching Video's for , php, id, html, working
advertisement



.php?id=html Not Working



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE