Jump to content

changing path in PHP script


minbak

Recommended Posts

I have encountered a little bit problem here when I transferred my site to new host.

My new host doesn't allow FOPEN in the PHP code to access a URL.

So someone suggested me to change from the

Original code
http://www.Motortradermalaysia.com/ShowBan...ype=468x60'

to suggested code
ShowBanner.php?BannerType=468x60

Am I right?


My problem is I could see the file of ShowBanner.php but not ShowBanner.php?BannerType=468x60.


?BannerType=468x60
Where could I find this file?

This is the uploaded banner by the user.

What is the correct code?
Link to comment
Share on other sites

?BannerType=468x60 is creating a variable in a superglobal array called $_GET.  You need something in your code to tell it what to get/do.  If that's a size for an image you might echo an img tag with the correct size or similar.  Unless you specifically tell it to look for a file, it's just passing the banner type variable to the page.

Also, when you write in for help, including the page code always helps.  Just remmeber to scrub out any personal data (DB passwords etc.)

Good luck and I hope this helps.
Link to comment
Share on other sites


The original code is

<?
include_once($BannerPath."/ShowBanner.php?BannerType=120x60");
[color=red][font=Verdana][b]?>
</center>
</td>


  <td valign=top style="padding-top:5" width=600>  <div align="center">
    <?
include_once($BannerPath."/ShowBanner.php?BannerType=468x60");
?>
  </div>[/b][/font][/color]


What is the correct code to avoid using Fopen ?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.