-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example 5 #2
Comments
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 <form method="post" action="/edit.php?id=<?= $item->getId() ?>"> To: <form method="post" action="/dynamic-site/public/edit.php?id=<?= $item->getId() ?>"> allitems.php ...
<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 <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.
The text was updated successfully, but these errors were encountered: