The source is always relative to the viewer.
So, when my browser sees C:/Program%20Files/ it’s actually trying to find the file in the “Program Files” directory on my computer, which of course doesn’t exist at all.
You will need to use the public-facing URL of that file instead.
Thanks MacManX.
It should be possible to be able to upload the game files into WordPress so then the files will have an URL address??? Do I need a plugin to store files or it’s embeded into WordPress???
No, WordPress doesn’t support uploading that file type, but since you have server access you can drag the files over to the web root instead. Place them in WordPress’s uploads directory, that way you know what the public facing URL will be. 🙂
It’s a really good idea 🙂
I’m very biginner but I like to learn.
I guess, if I put the files into the upload directory, the URL will be:
http:\\myaddress\upload\index,html
If I create a folder into the upload directory it works?
http:\\myaddress\upload\GAME\index,html
I’ll try that this evening and I give you an update.
I really appreciate your help !!!!
So, WordPress’s upload directory is at /wp-content/uploads/ and there are further directories down in the structure of /wp-content/uploads/[year]/[month]/[uploaded-files.whatever]
To keep things organized, with non-WordPress uploads separated from WordPress uploads, I recommend creating a special directory in there, like /wp-content/uploads/other/ where you’d put /wp-content/uploads/other/[game]
That way, you know your game’s public-facing URL will be http://myaddress/wp-content/uploads/other/[game] (remember, public-facing URLs use forward slashes) and so your iframe would be:
<iframe src="http://myaddress/wp-content/uploads/other/[game]" width="360" height="480"></iframe>
(remember, HTML uses greater-than and less-than symbols around elements, not brackets)
Thank you very much!!!!
I add the game folder into:
../wp-content/uploads/games/FirstGame/
And I put this script into the web page:
[iframe src=”http://MyWebSite/wp-content/uploads/games/FirstGame/index.html” width=”320″ height=”480″]
It works!
I learn a lot about the URL vs folder and IFRAME.
I’m very happy!!!
Thanks!