Open kklepper opened 10 years ago
Few dirty moves, just to get it working in http://your.ip/dynamic-site/public...
Open /dynamic-site/application/views/additem.php
Change:
<form method="post" action="/add.php">
To:
<form method="post" action="/dynamic-site/public/add.php">
Same changes in other files edititem.php Change:
<form method="post" action="/edit.php?id=<?= $item->getId() ?>">
To:
<form method="post" action="/dynamic-site/public/edit.php?id=<?= $item->getId() ?>">
allitems.php Change:
...
<td><a href="/edit.php?id=<?= $item->getId() ?>">edit</a></td>
...
<p><a href="**/**add.php">add new item</a></p>
To:
...
<td><a href="/dynamic-site/public/edit.php?id=<?= $item->getId() ?>">edit</a></td>
...
<p><a href="/dynamic-site/public/add.php">add new item</a></p>
header.php Change:
<link rel="stylesheet" href="/assets/reset.css"/>
<link rel="stylesheet" href="/assets/dynamic.css"/>
To:
<link rel="stylesheet" href="/dynamic-site/public/assets/reset.css"/>
<link rel="stylesheet" href="/dynamic-site/public/assets/dynamic.css"/>
In /dynamic-site/public in add.php and edit.php, change all these lines:
header('location: /');
To:
header('location: /dynamic-site/public/');
Shouldn't be done like that
^^^ Scam post ignore (dodgy link)
I reported the user with a link to this comment. Would suggest others do the same.
Great, I can see its been removed, top job!
Thanks a lot, this is extremely helpful.
But some problems in Example 5: dynamic does not work.
How to see:
add
ini_set("display_errors", 1);
to public/index.php. You'll see why you didn't see anything: you have problems with mysql.
How to fix:
change @'%' to @'localhost' in dynamic.sql
DocumentRoot
DocumentRoot is not executed as given in dynamic-site.conf, so http://192.168.0.42/dynamic-site/ or http://myprecisebox/dynamic-site/ will show the directory structure of dynamic-site instead of dynamic-site/public/index.php
As a result, references to href in the html files fail. No idea how to fix this yet.