Jump to content

realnsleo

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by realnsleo

  1. oh i see.. thanks .. so is it a good idea to keep php files out of the www directory? my web host directory is like this - mydomain.com -.cpanel -.htpasswds -.access_logs -.etc -.public_ftp -.public_html -.tmp -.www is it more secure to create a directory for my php files outside the www directory and call them using <?php $_SERVER["DOCUMENT_ROOT"]."/myDirectory/myfiles.php"; ?> as you mentioned?
  2. wait, sorry i am not understanding. okay i got a couple of more questions. let's say i have purchased a domain called www.mydomain.com and there are a couple of files under this domain like index.php, aboutus.php and contactus.php, then i create a subdomain called sub.mydomain.com where i save some php files for example a script that sends mail. so in the form on the contactus.php what will i place on the action ie <form method="post" action="?"> another question is in my website i have some php configuration files like the database connection and other scripts that perform important functions. however when i try to require a php file into one of my php pages i get an error. why is that and how can i include or require php files easily. eg require("http://mydomain.com/phpfiles/myphpfile.php"); // does not work thanks for all the help.
  3. thanx a bunch. that helped. does it work for subdomains too? am guessing <a href="subdomain.<?= $_SERVER['SERVER_NAME']/file.php">FILE</a>
  4. hello everyone .. i am pretty new to php programming and web development and i need to ask this. i have designed a few websites for my clients and i am getting better and now i have started learning php to add dynamic feel to the websites. my question is whenever i create links in my pages i do something like <a href="index.php">HOME</a>, <a href="aboutUs.php">ABOUT US</a> and so on. So i uploaded the website and whenever i view the source code the links appear exactly like that yet in other professional websites i have seen i always see something like <a href="http://www.facebook.com/home.php">HOME</a> for example. what am i doing wrong. how can i make better links to other pages. what is the use of building links in that format. thank you.
  5. hi everyone .. i have just finished developing a web application i hope to put on the www very soon. however my application has various folders that i dont want the public to access directly through a URL for example the images, config and includes folder which contain database and php scripts containing classes and functions and so on.. secondly in the includes folder for example i have a file called functions.php. so when someone accesses www.mysitename.com/includes/functions.php, i want a message to be output saying file cannot be accessed. can anyone please tell me how i can go about this. thank you
×
×
  • 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.