<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[הגדרת מילה שמורה ב PHP]]></title><description><![CDATA[<p dir="auto">שלום וברכה לכל החברים היקרים.</p>
<p dir="auto">יש לי קובץ TXT שנמצא בשרת, קוד PHP קורא אותו ומעלה את התוכן שלו למסד נתונים בצורה כזו:</p>
<pre><code>Name = SARA;
age = 60;

</code></pre>
<p dir="auto">כלומר המחרוזת שנמצאת בשורה <strong>Name</strong> תכנס במסד נתונים לטבלא שנקראת Name.<br />
המחרוזת שנמצאת בשורה <strong>age</strong> תכנס במסד נתונים לטבלא שנקראת age, וכן ע"ז הדרך.</p>
<p dir="auto">אני רוצה להדגיר שהמילה  Name תהיה שמורה, בכדי:</p>
<ol>
<li>שהקוד <strong>לא יחשיב את Name</strong> כחלק ממה שצריך להעלות לשרת.</li>
<li>יעלה את כל המחרוזת שאחרי<code> = Name</code>, עד סימן כל שהוא, נגיד<code> ;</code><br />
(כל המודגש):<br />
; Name = <strong>SARA</strong><br />
כלומר יעלה את הערכים שבאים אחרי ה =Name עד הסימן <code> ;</code>.</li>
<li>שלא משנה איפה <code>;      Name = String</code> יהיה ממוקם במסמך הוא יזהה להעלות את המחרוזת לטבלא Name במסד הנתונים.</li>
</ol>
<p dir="auto">אודה מאוד לכל עזרה בנושא.<br />
תודה רבה.</p>
]]></description><link>https://tchumim.com/topic/12072/הגדרת-מילה-שמורה-ב-php</link><generator>RSS for Node</generator><lastBuildDate>Thu, 21 May 2026 05:24:51 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/12072.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 17 Oct 2021 00:16:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Mon, 18 Oct 2021 04:38:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ass">@<bdi>ass</bdi></a> כעת אני מבין שבכלל לא הבנתי אותך מעיקרא. חשבתי שאתה מתלבט איך לשלוח למסד הנתונים את המידע, ולא איך לפענח אותו מקובץ הטקסט. יש"כ ל <a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A9%D7%9E%D7%95%D7%90%D7%9C4">@<bdi>שמואל4</bdi></a> שירד בסבלנותו לסוף דעתך.</p>
]]></description><link>https://tchumim.com/post/130120</link><guid isPermaLink="true">https://tchumim.com/post/130120</guid><dc:creator><![CDATA[OdedDvir]]></dc:creator><pubDate>Mon, 18 Oct 2021 04:38:18 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Mon, 18 Oct 2021 00:20:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A9%D7%9E%D7%95%D7%90%D7%9C4">@<bdi>שמואל4</bdi></a><br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/odeddvir">@<bdi>odeddvir</bdi></a><br />
<strong>parse_ini_string</strong> עשה את העבודה מצויין.</p>
<p dir="auto">תודה רבה על העזרה בשעות לא שעות<br />
(או כן שעות, תלוי אם שואלים מתכנת או חשמלאי <img src="https://tchumim.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=9d71ebe86e6" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> )</p>
]]></description><link>https://tchumim.com/post/130118</link><guid isPermaLink="true">https://tchumim.com/post/130118</guid><dc:creator><![CDATA[ASS]]></dc:creator><pubDate>Mon, 18 Oct 2021 00:20:04 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 17:23:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ass">@<bdi>ass</bdi></a> ה"בעייה" שלך היא באמת לא בעיה. אתה פשוט צריך לשלוח למסד הנתונים את הנתונים בפורמט JSON ולא INI. תן ל-API של המסד נתונים להתמודד, הוא ידע לעשות זאת נפלא, ו"להבין" לבד מהו <strong>שם של מאפיין</strong> באובייקט ומהו <strong>הערך</strong> שלו. זו יכולת בסיסית של כל API או מסד נתונים, להפוך JSON לאובייקט.</p>
<p dir="auto">לדוגמא תשלח כך:</p>
<pre><code>[{
   name: 'Sara',
   age: 30
},
{
   name: 'Avraham',
   age: 40
}]
</code></pre>
<p dir="auto">ה-API "יבין" שמדובר במערך שמכיל שני אובייקטים, וידע להקצות את הערכים בהתאמה, כי כך הוא אמור לנתח את ה-JSON.<br />
עריכה:<br />
גם <strong>סדר הופעת המאפיינים באובייקט אינו משנה כלל</strong>, כך שהדוגמא לעיל יכולה להיות גם כך:</p>
<pre><code>[{
   age: 30,
   name: 'Sara'
},
{
   age: 40,
   name: 'Avraham'
}]
</code></pre>
<p dir="auto">והתוצאה תהיה זהה.<br />
עם זאת, <strong>סדר האיברים במערך - כן משנה</strong>, והם ייכנסו למערך שיווצר <strong>לפי סדר הופעתם</strong>, דהינו שרה תהיה בתא [0], ואברהם בתא [1].</p>
]]></description><link>https://tchumim.com/post/130079</link><guid isPermaLink="true">https://tchumim.com/post/130079</guid><dc:creator><![CDATA[OdedDvir]]></dc:creator><pubDate>Sun, 17 Oct 2021 17:23:17 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 01:05:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ass">@<bdi>ass</bdi></a> אתה צריך לכאורה את parse_ini_string.<br />
אם יש כמה שורות אתה רץ עם לולאה על המערך שאתה מקבל.</p>
]]></description><link>https://tchumim.com/post/130073</link><guid isPermaLink="true">https://tchumim.com/post/130073</guid><dc:creator><![CDATA[שמואל4]]></dc:creator><pubDate>Sun, 17 Oct 2021 01:05:26 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 01:02:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A9%D7%9E%D7%95%D7%90%D7%9C4">@<bdi>שמואל4</bdi></a><br />
אני באמת לא מבין מה אני צריך לענות?!</p>
<p dir="auto">הקוד הופך למערך עם <code>explode</code>.<br />
כל שורה בעצם נכנסת  למסד בנפרד ע"י הצבת משתנים.</p>
<p dir="auto">זה מה שיש כעת, וזה בעייתי כי אני לא רוצה שאם אני יוסיף הערה בתחילת הקובץ וירד שורה, אז הכל ישתבש.<br />
אני צריך שהקוד ידע ש name בקובץ זה מפתח ולא חלק ממה שעולה למסד.</p>
]]></description><link>https://tchumim.com/post/130072</link><guid isPermaLink="true">https://tchumim.com/post/130072</guid><dc:creator><![CDATA[ASS]]></dc:creator><pubDate>Sun, 17 Oct 2021 01:02:35 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 00:56:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ass">@<bdi>ass</bdi></a><br />
לא ענית את השאלות שלי, עשית העתק הדבק של הקוד שלך.<br />
אם אתה רוצה שאני אתן לך תשובה נכונה תענה על כל השאלות שלי.</p>
]]></description><link>https://tchumim.com/post/130071</link><guid isPermaLink="true">https://tchumim.com/post/130071</guid><dc:creator><![CDATA[שמואל4]]></dc:creator><pubDate>Sun, 17 Oct 2021 00:56:18 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 01:03:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A9%D7%9E%D7%95%D7%90%D7%9C4">@<bdi>שמואל4</bdi></a><br />
אוקי, צודק אני יפרט.</p>
<pre><code>
$file=  explode("\n",file_get_contents("https://www.call2all.co.il/ym/api/DownloadFile?token=${token}&amp;path=${path_txt}"));
    //הוצאה ממערך ושליחה למסד
    $name = $file_get[0];
    $ago = $file_get[1];

$Login = new mysqli("localhost", "root", "");
if ($Login-&gt;connect_error) {die("נכשלה"." phpmyadnin "."ההתחברות ל ". $Login-&gt;connect_error);}
$db = mysqli_select_db ($Login , 'W') ;
if ($db == false) {die("&lt;br&gt;" ."התחברות למסד נתונים נכשלה");}
 $Enter_data = "INSERT INTO `data`(`name`, `ago`)
 VALUES ($name , '$ago')"; 
mysqli_query($Login, $Enter_data);  


</code></pre>
]]></description><link>https://tchumim.com/post/130070</link><guid isPermaLink="true">https://tchumim.com/post/130070</guid><dc:creator><![CDATA[ASS]]></dc:creator><pubDate>Sun, 17 Oct 2021 01:03:26 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 00:45:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ass">@<bdi>ass</bdi></a> אמר ב<a href="/post/130068">הגדרת מילה שמורה ב PHP</a>:</p>
<blockquote>
<p dir="auto">לבצע פונקציות כאלה</p>
</blockquote>
<p dir="auto">לא יודע מה זה כאלה, אני לא יודע מה אתה רוצה.<br />
יש ל php פונקציות להמרת ini למערך ולהמרת סטרינג במבנה ini למערך.</p>
<p dir="auto"><a href="https://www.php.net/manual/en/function.parse-ini-file.php" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.php.net/manual/en/function.parse-ini-file.php</a></p>
<p dir="auto"><a href="https://www.php.net/manual/en/function.parse-ini-string.php" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.php.net/manual/en/function.parse-ini-string.php</a></p>
<p dir="auto">לא יודע אם זה יעזור לך כי אין לי מושג מה אתה רוצה לעשות...</p>
]]></description><link>https://tchumim.com/post/130069</link><guid isPermaLink="true">https://tchumim.com/post/130069</guid><dc:creator><![CDATA[שמואל4]]></dc:creator><pubDate>Sun, 17 Oct 2021 00:45:46 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 00:54:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A9%D7%9E%D7%95%D7%90%D7%9C4">@<bdi>שמואל4</bdi></a> אמר ב<a href="/post/130067">הגדרת מילה שמורה ב PHP</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ass">@<bdi>ass</bdi></a> אמר ב<a href="/post/130065">הגדרת מילה שמורה ב PHP</a>:<br />
אם זה במבנה של ini יש לזה פונקציות ברורות.</p>
</blockquote>
<p dir="auto">איפה אני יכול ללמוד איך לבצע פונקציות כאלה ב ini .</p>
]]></description><link>https://tchumim.com/post/130068</link><guid isPermaLink="true">https://tchumim.com/post/130068</guid><dc:creator><![CDATA[ASS]]></dc:creator><pubDate>Sun, 17 Oct 2021 00:54:23 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 00:40:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ass">@<bdi>ass</bdi></a> אמר ב<a href="/post/130065">הגדרת מילה שמורה ב PHP</a>:</p>
<blockquote>
<p dir="auto">אני יכול להשתמש ב str_replace ולהוריד את המפתח. אבל אני רוצה שיזהה את הערכים לפי המפתחות.</p>
</blockquote>
<p dir="auto">זה עקום, אם זה במבנה של ini יש לזה פונקציות ברורות.<br />
אבל שוב, עניתי...</p>
]]></description><link>https://tchumim.com/post/130067</link><guid isPermaLink="true">https://tchumim.com/post/130067</guid><dc:creator><![CDATA[שמואל4]]></dc:creator><pubDate>Sun, 17 Oct 2021 00:40:08 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 00:39:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ass">@<bdi>ass</bdi></a> וואו. אתה לא מבין עברית?<br />
אני לא מבין איך הקוד הופך, עם איזה פונקציות אתה משתמש, איזה שאילת אתה מריץ בסוף, איך היא נוצרת, מה הצורך, מה קורה עכשיו, ומה אתה רוצה שיקרה.<br />
עד שאתה לא עונה על כל השאלות אני לא יכול לעזור כי השאלה לא נותנת שום מידע שאני יכול לנסות להבין מה הבעיה ולמה אתה מחפש עזרה.<br />
סורי.</p>
]]></description><link>https://tchumim.com/post/130066</link><guid isPermaLink="true">https://tchumim.com/post/130066</guid><dc:creator><![CDATA[שמואל4]]></dc:creator><pubDate>Sun, 17 Oct 2021 00:39:12 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 00:38:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A9%D7%9E%D7%95%D7%90%D7%9C4">@<bdi>שמואל4</bdi></a><br />
כרגע אין למפתחות שם תפקיד, הקוד הופך את הקובץ למערך כך שכל שורה מקבלת אינדקס.<br />
ואז מעלה את כל שורה לטבלא יחד עם המפתחות.<br />
כלומר מעלה את כל זה: name=shmuel<br />
במקום רק את זה: shmuel</p>
<p dir="auto">אני יכול להשתמש ב str_replace ולהוריד את המפתח. אבל אני רוצה שיזהה את הערכים לפי המפתחות.</p>
]]></description><link>https://tchumim.com/post/130065</link><guid isPermaLink="true">https://tchumim.com/post/130065</guid><dc:creator><![CDATA[ASS]]></dc:creator><pubDate>Sun, 17 Oct 2021 00:38:05 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 00:32:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ass">@<bdi>ass</bdi></a> אמר ב<a href="/post/130063">הגדרת מילה שמורה ב PHP</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A9%D7%9E%D7%95%D7%90%D7%9C4">@<bdi>שמואל4</bdi></a><br />
מה שנכנס למסד הנתונים זה הערכים (shmuel, 11).<br />
המפתחות אמורים לומר לקוד איזה ערכים לשים באיזה טבלא.</p>
</blockquote>
<p dir="auto">מה זה אמורים?<br />
מה הבעיה בעצם?<br />
שוב, מה הקוד שלך? אני לא יכול לעזור כי לא הבנתי מה הבעיה.</p>
]]></description><link>https://tchumim.com/post/130064</link><guid isPermaLink="true">https://tchumim.com/post/130064</guid><dc:creator><![CDATA[שמואל4]]></dc:creator><pubDate>Sun, 17 Oct 2021 00:32:41 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 00:33:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A9%D7%9E%D7%95%D7%90%D7%9C4">@<bdi>שמואל4</bdi></a><br />
מה שנכנס למסד הנתונים זה הערכים (shmuel, 11).<br />
המפתחות אמורים לומר לקוד איזה ערכים לשים באיזה טבלא.<br />
הקוד שלי כרגע מכניס את הקובץ למערך כך שכל שורה מקבלת אינדקס.</p>
]]></description><link>https://tchumim.com/post/130063</link><guid isPermaLink="true">https://tchumim.com/post/130063</guid><dc:creator><![CDATA[ASS]]></dc:creator><pubDate>Sun, 17 Oct 2021 00:33:23 GMT</pubDate></item><item><title><![CDATA[Reply to הגדרת מילה שמורה ב PHP on Sun, 17 Oct 2021 00:24:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ass">@<bdi>ass</bdi></a> לא ממש הבנתי מה הקובץ שאתה נותן ממנו דוגמא ואיך הוא נכנס למסד נתונים.<br />
להבנתי יש לך קובץ שכתוב פה</p>
<pre><code>name=shmuel
ago=11
</code></pre>
<p dir="auto">ואתה רוצה להכניס את זה למסד נתונים ואתה רוצה לשנות את המפתחות (name,ago) ולהשאיר את הערכים ולהעניס אותם לטבלא?<br />
תתן דוגמא למה שאתה עושה עכשיו בצורה יפה לא רחבה.</p>
]]></description><link>https://tchumim.com/post/130062</link><guid isPermaLink="true">https://tchumim.com/post/130062</guid><dc:creator><![CDATA[שמואל4]]></dc:creator><pubDate>Sun, 17 Oct 2021 00:24:43 GMT</pubDate></item></channel></rss>